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 is size_type?
what is a reference variable in C++?
Explain operator overloading.
What return value must conversion operators have in their declaration?
What is meant by iomanip in c++?
What is the difference between a "copy constructor" and an "assignment operator" in C++?
What is a constructor and how is it called?
How are Structure passing and returning implemented by the compiler?
What is the difference between function overloading and operator overloading?
Can a program run without main?
What are the data types in c++?
What is data types c++?
What does I ++ mean in c++?
Do you know what are the new features that iso/ansi c++ has added to original c++ specifications?
Which is most difficult programming language?