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 a memory leak c++?

0 Answers  


which of the following is not an secondary constant a) array b) real c) union

0 Answers  


What do you know about friend class and friend function?

1 Answers  


write the programme that convert a interger to biniry number

1 Answers   Amazon,


what are the iterator and generic algorithms.

0 Answers  






What is stl containers in c++?

0 Answers  


How to detect memory leaks in c++

1 Answers   Mphasis,


Why is c++ still popular?

0 Answers  


Explain object slicing in c++?

0 Answers  


Write a note about the virtual member function?

0 Answers  


If a round rectangle has straight edges and rounded corners, your roundrect class inherits both from rectangle and from circle, and they in turn both inherit from shape, how many shapes are created when you create a roundrect?

0 Answers  


What is the difference between "overloading" and "overridding"?

3 Answers  


Categories