How long does this loop run:
for(int x=0; x=3; x++)
a) Never
b) Three times
c) Forever
Answer Posted / pracheer gupta
what r u saying guys..
the loop will run c) forever
this is bcoz in the termination part it is actually x=3 and
not x==3.
x=3 will always evaluate to true and hence the loop is
executed infinite times.
| Is This Answer Correct ? | 94 Yes | 11 No |
Post New Answer View All Answers
Define pure virtual function?
Why ctype h is used in c++?
Explain how to initialize a const data member.
What are associate containers?
What are c++ variables?
Tell me what are static member functions?
Should the this pointer can be used in the constructor?
How would you use the functions randomize() and random()?
I want explanation for this assignment: how to connect mysql database using c/c++,please explain this detailly?
Is c++ harder than java?
State two differences between C and C++.
How does work in c++?
In int main(int argc, char *argv[]) what is argv[0] a) The first argument passed into the program b) The program name c) You can't define main like that
what are the iterator and generic algorithms.
How do I use turbo c++?