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 the difference between ++ count and count ++?

0 Answers  


What is operator overloading in c++ example?

0 Answers  


What is pointer to member?

0 Answers  


What is the two main roles of operating system?

0 Answers  


How would you obtain segment and offset addresses from a far address of a memory location?

0 Answers  






what is data Abstraction? and give example

147 Answers   Aaditya Info Solutions, American Express, CMS, College School Exams Tests, Data Entry Operator, First Advantage, Google, HCL, IBM, Infosys, Microsoft, Mind Links, NIIT, Oracle, Pact, QBit Systems, TCS, WAYA, Wipro,


How many namespaces are there in c++?

0 Answers  


What are c++ tokens?

0 Answers  


Define a pointer to a data member of the type pointer to pointer?

0 Answers  


Why is c++ considered difficult?

0 Answers  


What happens if a pointer is deleted twice?

0 Answers   Flextronics,


What is setw manipulator in c++?

0 Answers  


Categories