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
Write a program which uses Command Line Arguments
What is the use of namespace std in C++?
What is the difference between a baller and a reference in C++?
Explain the difference between c & c++?
What are proxy objects in c++?
Describe the advantages of operator overloading?
Inline parameters : What does the compiler do with the parameters of inline function, that can be evaluated in runtime ?
Is c++ vector dynamic?
How can a called function determine the number of arguments that have been passed to it?
What is dynamic and static typing?
Which c++ operator cannot overload?
Carry out conversion of one object of user-defined type to another?
A mXn matrix is given and rows and column are sorted as shown below.Write a function that search a desired entered no in the matrix .with minimum complexity 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Can I run c program in turbo c++?
Reads in the size of a square from the screen; 2. Prints a hollow square of that size out of “-“, “|” and blanks on screen; 3. Prints the same hollow square onto a text file. Your program should work for squares of all side sizes between 1 and 20. --- │ │ │ │ │ │ ---