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

How to implement is-a and has-a class relationships?

667


Which of the following is evaluated first: a) && b) || c) !

1939


Define token in c++.

810


What is else if syntax?

772


How do you invoke a base member function from a derived class in which you have not overridden that function?

698






Tell me can a pure virtual function have an implementation?

662


Can create new c++ operators?

655


Explain abstraction.

698


What is c++ flowchart?

783


How do you define a class in c++?

722


What is the limitation of cin while taking input for character array?

1567


Describe Trees using C++ with an example.

701


What are the two shift operators and what are their functions?

668


What is an operator in c++?

695


What is null pointer and void pointer and what is their use?

679