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

If you don’t declare a return value, what type of return value is assumed?

0 Answers  


Why do we use iterators?

0 Answers  


Comment on local and global scope of a variable.

0 Answers  


Can we declare destructor as static? Explain?

3 Answers  


What are the basics concepts of OOPS?

1 Answers  






What are the different types of comments allowed in c++?

0 Answers  


Difference between overloaded functions and overridden functions

0 Answers  


Differentiate between a constructor and a destructor in c++.

0 Answers  


What's the hardest coding language?

0 Answers  


What are namespaces in c++?

0 Answers  


Differentiate between late binding and early binding.

0 Answers  


What is singleton class in c++?

0 Answers  


Categories