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



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

Answer / 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

More C++ General Interview Questions

How does java differ from c and c++?

0 Answers  


What problem does the namespace feature solve?

1 Answers  


Is c++ the best programming language?

0 Answers  


Show the declaration for a static member variable.

0 Answers  


What are protected members in c++?

0 Answers  






What is a static member?

0 Answers  


What is the error in the code below and how should it be corrected?

0 Answers  


How do you import payscale data from non SAP to SAP?is it through LSMW or any other way is there?

0 Answers  


What are friend classes? What are advantages of using friend classes?

0 Answers  


What do you mean by function pointer?

0 Answers  


What is a concrete class?

1 Answers  


Explain rtti.

0 Answers  


Categories