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 is difference c and c++?

1 Answers  


Explain the difference between 'operator new' and the 'new' operator?

1 Answers   Lucent, TCS,


What is a reference in C++?

1 Answers  


When is a template a better solution than a base class?

1 Answers  


What is object in c++ example?

0 Answers  






What is the output of printf("%d")?

58 Answers   CTS, HCL, Infosys, TCS, Winit, Wipro,


What are the techniques you use for debugging?

1 Answers   Adtran,


What is an associative container in c++?

0 Answers  


What is c++ code?

0 Answers  


How many namespaces are there in c++?

0 Answers  


if int1 has the value 12, int has the value 18, and int3 has the value 21, what is the result: int1 < int2 && int2 < int 3

3 Answers  


What is a float in c++?

0 Answers  


Categories