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
What are the advantages of prototyping?
Does c++ cost money?
What is a constant reference?
What is encapsulation in C++? Give an example.
What is an adjust field format flag?
How is c++ different from java?
What is binary object model?
Why is that unsafe to deal locate the memory using free( ) if it has been allocated using new?
Write a program to concatenate two strings.
Are vectors faster than arrays?
Where is atoi defined?
what are the decision making statements in C++? Explain if statement with an example?
Differentiate between an array and a list?
Which software is best for coding?
When does a 'this' pointer get created?