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
what is a class? Explain with an example.
What you know about structures in C++?
How to get the current position of the file pointer?
What does return 0 do in c++?
What is the first name of c++?
Write a C++ Program to check whether a number is prime number or not?
How do we balance an AVL Tree in C++?
what is scupper?
What c++ is used for?
Which compiler does turbo c++ use?
What is exception handling? Does c++ support exception handling?
Define the process of handling in case of destructor failure?
What is a list c++?
what you know about c++?
Write a Program to find the largest of 4 no using macros.