How long does this loop run:
for(int x=0; x=3; x++)
a) Never
b) Three times
c) Forever
Answer Posted / manju
The correct and verified answer is the loop runs forever
the answer is c. it is so becoz in condition part we are
giving i=3 and not i==3.
so it executes infinite times.
Is This Answer Correct ? | 32 Yes | 3 No |
Post New Answer View All Answers
What are mutator methods in c++?
What is the full form of dos?
. If employee B is the boss of A and C is the boss of B and D is the boss of C and E is the boss of D. Then write a program using the Database such that if an employee name is Asked to Display it also display his bosses with his name. For eg. If C is displayed it should also display D and E with C?
What is Destructor in C++?
Is main a class in c++?
What is the benefit of c++?
write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;
How a macro differs from a template?
What are the classes in c++?
If you hear the cpu fan is running and the monitor power is still on, but you did not see anything show up in the monitor screen. What would you do to find out what is going wrong?
Mention the storage classes in c++.
Explain polymorphism?
When can I use a forward declaration?
Define a conversion constructor?
What are static and dynamic type checking?