+ 2

In C minimum number of times for, while,do while loop runs is 0 . But In C++ minimum count of loop runs 1 how ?

C C++

16th Jun 2019, 1:24 PM
PRAVEEN R
PRAVEEN R - avatar
3 Respostas
+ 6
In both c and c++ example: while(false); //not executed for(int x=2; x<1;++x); //not executed do{} while(false); /*runs one time and then checking*/
16th Jun 2019, 2:15 PM
electron
electron - avatar
+ 5
Uhh, in both languages it runs 0 times when the condition is false, but the do loop runs at least once in both languages
16th Jun 2019, 1:27 PM
Airree
Airree - avatar
+ 1
Do while loop executes at least one time but other loops
16th Jun 2019, 2:23 PM
PRAVEEN R
PRAVEEN R - avatar