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 the difference between global variables and static varables?
Differences between private, protected and public and give examples.
What sorting algorithm does c++ use?
write a corrected statement so that the instruction will work properly. if (4 < x < 11) y = 2 * x;
Is c# written in c++?
What is operator overloading in c++ example?
Explain what is class definition in c++ ?
What is the purpose of ios::basefield in the following statement?
Is map sorted c++?
What is scope resolution operator in c++ with example?
What is pure virtual function?
What is split a string in c++?
What is data types c++?
What is c++ good for?
Explain the advantages of using friend classes.