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
Explain the uses of static class data?
Name the debugging methods that are used to solve problems?
Why would you use pointers in c++?
Is it legal in c++ to overload operator++ so that it decrements a value in your class?
How will you call C functions from C ++ and vice-versa?
What is the copy-and-swap idiom?
How do you invoke a base member function from a derived class in which you have not overridden that function?
What is the role of C++ shorthand's?
What is diamond problem in c++?
Explain how functions are classified in C++ ?
Why do we need pointers?
State two differences between C and C++.
What is rvalue?
what you know about c++?
How can you link a c++ program to c functions?