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

i want the NIC programmer-B model papaer pattren, iwant the all model papers?

15 Answers   NIC,


Do class method definitions?

0 Answers  


What is the purpose of ios::basefield in the following statement?

0 Answers  


Is there a new/delete equivalent of realloc?

1 Answers  


What is ostream in c++?

0 Answers  






Can I learn c++ without c?

0 Answers  


Explain how we implement exception handling in c++?

0 Answers  


What is the extraction operator and what does it do?

0 Answers  


Which one is a preferred language C or C++? Why?

0 Answers  


What are the advantages of using pointers in a program?

0 Answers  


What is lambda expression c++?

0 Answers  


Can java be faster than c++?

0 Answers  


Categories