+ 5

What will be do if the updation of loop is not given & condition is true

28th Apr 2017, 6:00 PM
Akash Verma
Akash Verma - avatar
4 Respostas
+ 10
like this? for(;true;) ?? Infinite loop unless condition becomes false. Might as well use a while loop at this point.
28th Apr 2017, 6:08 PM
Rrestoring faith
Rrestoring faith - avatar
+ 4
the loop becomes infinite
28th Apr 2017, 6:07 PM
Akash Verma
Akash Verma - avatar
+ 4
he wants the q and the a. lol
28th Apr 2017, 6:09 PM
jay
jay - avatar
0
Instead of for(x=0;x<1;x++){do that;} you will have if(true){do this;} for a valid code. If you will do for(;x=0;){do this} you will have infinite loop.
28th Apr 2017, 6:31 PM
Stratulat Alexandru
Stratulat Alexandru - avatar