How long does this loop run:

for(int x=0; x=3; x++)
a) Never
b) Three times
c) Forever

Answers were Sorted based on User's Feedback



How long does this loop run: for(int x=0; x=3; x++) a) Never b) Three times c) Forever ..

Answer / p.lakshmi narasimha

never

Is This Answer Correct ?    0 Yes 0 No

How long does this loop run: for(int x=0; x=3; x++) a) Never b) Three times c) Forever ..

Answer / g m rajput

int main()
{
int f=1;
for(:f:)
cout<<"f="<<f++<<"
;
return 0;
}

Is This Answer Correct ?    0 Yes 0 No

How long does this loop run: for(int x=0; x=3; x++) a) Never b) Three times c) Forever ..

Answer / gaurav

forever because this loop is infinite condition.

Is This Answer Correct ?    0 Yes 1 No

How long does this loop run: for(int x=0; x=3; x++) a) Never b) Three times c) Forever ..

Answer / nava

forever

don fight just execute n c!

Is This Answer Correct ?    0 Yes 2 No

How long does this loop run: for(int x=0; x=3; x++) a) Never b) Three times c) Forever ..

Answer / amrutha

a)Never

Eric is fooler than Premalatha

Is This Answer Correct ?    3 Yes 13 No

How long does this loop run: for(int x=0; x=3; x++) a) Never b) Three times c) Forever ..

Answer / sur

never..
because initially condition is true,
and x is false, so it will comes out of loop.

Is This Answer Correct ?    10 Yes 23 No

How long does this loop run: for(int x=0; x=3; x++) a) Never b) Three times c) Forever ..

Answer / k.premalatha

a) Never

Is This Answer Correct ?    4 Yes 20 No

Post New Answer

More C++ General Interview Questions

Write a program to interchange 2 variables without using the third one.

0 Answers  


How can you say that a template is better than a base class?

0 Answers  


Difference between an inspector and a mutator

0 Answers  


What is the type of 'this' pointer?

0 Answers  


Explain data encapsulation?

0 Answers  






What is the use of class in c++?

0 Answers  


List the advantages of inheritance.

0 Answers  


Can char be a number c++?

0 Answers  


What header file is needed for exit(); a) stdlib.h b) conio.h c) dos.h

0 Answers  


Difference between overloaded functions and overridden functions

0 Answers  


What is constant in c++ with example?

0 Answers  


difference between c and c++?

38 Answers   Cognizant, IBM, Infosys, Oracle, Sarva Shiksha Abhiyan, Wipro,


Categories