+ 2

So what is the difference between do and do...while loops?

4th Feb 2018, 6:27 PM
PizzaOwl
PizzaOwl - avatar
3 Réponses
+ 14
do while() , while () /*in do while() , condition is checked after executing the statements , while in while () loop , condition is checked before execution of the statement(s)*/
4th Feb 2018, 7:14 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 8
do while in an exit control loop. while is an entry control loop. The difference is in when the condition gets evaluated. ... Do while loopwill be executed atleast once.......but while loop will check the condition first and then it may or may not get executed depending on the condition. https://stackoverflow.com/questions/3625759/difference-between-while-loop-and-do-while-loop
4th Feb 2018, 7:08 PM
GAWEN STEASY
GAWEN STEASY - avatar