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

What are the differences between a struct in C and in C++?

8 Answers   Amazon, Wipro,


Why cout is used in c++?

0 Answers  


What is the real purpose of class – to export data?

0 Answers  


What are the basics concepts of OOPS?

1 Answers  


Why was c++ created?

0 Answers  


Who made c++?

0 Answers  


What is a manipulator in c++?

0 Answers  


What is the meaning of string in c++?

0 Answers  


Have you used MSVC? What do you think of it?

2 Answers   Google,


What is an iterator?

0 Answers  


What is runtime polymorphism in c++?

0 Answers  


What is boyce codd normal form in c++?

0 Answers  


Categories