Write a corrected statement in c++ so that the statement
will work properly. if (4 < x < 11) y=2*x;



Write a corrected statement in c++ so that the statement will work properly. if (4 < x < 11)..

Answer / Kunal Kishre

if (4 <= x && x <= 11) y = 2 * x;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

Explain rtti.

1 Answers  


Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.

1 Answers   TCS,


What is the syntax for a for loop?

1 Answers  


What is an operator in c++?

1 Answers  


Difference between Top down and bottom up approaches for a given project ?

14 Answers   BSNL, CSC, HCL, HP, IIT, Infosys, Siemens,


Define what is constructor?

1 Answers  


When should we use multiple inheritance?

1 Answers  


What is endianness?

1 Answers  


What is class and structure in c++?

1 Answers  


What is the difference between a declaration and a definition?

1 Answers  


What are the new features that iso/ansi c++ has added to original c++ specifications?

1 Answers  


What is a container class?

1 Answers  


Categories