+ 3
In looping process. What is the different between while loop & do while loop?
4 odpowiedzi
+ 11
while loop is an entry-control loop i.e. it will check the condition provided before entering the loop. On the other hand, do..while is an exit-control loop, it run the loop once then checks the conditions to ensure if it will do next iteration. Do..while will run the loop once even if condition met false
+ 14
https://www.sololearn.com/Discuss/496089/?ref=app
https://www.sololearn.com/Discuss/344091/?ref=app
//do while loop will execute atleast once even if condition is false as condition is checked after a iteration in do while() loop
+ 6
While loop:
If the condition is false, code will not run
Do while loop:
If the condition is false, code run only ONCE