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 #include iostream h in c++?
Write about the various sections of the executable image?
What are the important differences between c++ and java?
What is the difference between an enumeration and a set of pre-processor # defines?
Can you use the function fprintf() to display the output on the screen?
How can virtual functions in c++ be implemented?
How do I run a program in notepad ++?
Difference between a homogeneous and a heterogeneous container
What is std namespace in c++?
What are the differences between java and c++?
How can you say that a template is better than a base class?
When do we run a shell in the unix system?
How do you flush a buffer in c++?
What is the use of setfill in c++?
Difference between strdup and strcpy?