Write a corrected statement in c++ so that the statement
will work properly. if (x > 5); y = 2*x; else y += 3+x;

Answer Posted / rose

if(x>5)
{
y=2*x
}
else
{
int temp;
temp=3+x;
y+= temp;
}

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a stack? How it can be implemented?

704


Write a Program for find and replace a character in a string.

564


What is stl containers in c++?

595


write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;

1467


What is the purpose of templates in c++?

575






Which c++ operator cannot overload?

561


Differentiate between a constructor and a destructor in c++.

577


What is setiosflags c++?

541


what are the types of Member Functions?

624


Will rust take over c++?

602


How can you say that a template is better than a base class?

592


You want to link a c++ program to c functions. How would you do it?

549


Describe linked list using C++ with an example.

662


Which programming language is best to learn first?

596


How would you use the functions memcpy(), memset(), memmove()?

631