How long does this loop run:
for(int x=0; x=3; x++)
a) Never
b) Three times
c) Forever
Answer Posted / awaneesh dubey
Never . It will show compile time error . boolean required
at the terminationa condition not int . i.e. it should be
for(int x=0; x==3; x++) not for(int x=0; x=3; x++) .
x=3 will cause compilation error. So answer is never .
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Why is c++ not purely object oriented?
Explain 'this' pointer and what would happen if a pointer is deleted twice?
declare an array of structure where the members of the structure are integer variable float variable integer array char variable access all elements of the structure using dot operator and this pointer operator
What is #include sstream?
What is pointer to array in c++?
What is a hash function c++?
What is srand c++?
When are exception objects created?
What is runtime polymorphism in c++?
Explain the difference between new() and malloc() in c++?
What are the vectors in c++?
Explain the differences between private, public and protected and give examples.
You have two pairs: new() and delete() and another pair : alloc() and free(). Explain differences between eg. New() and malloc()
What are friend classes?
What do you understand by zombie objects in c++?