Computer Science, asked by Swarup1998, 10 months ago

Exhibit the difference of 'while' and 'do-while' loop.​

Answers

Answered by Anonymous
53

Answer :-

A 'while' loop checks the end condition first. If the end condition is not yet true, the loop runs and the 'do-while' loop runs the code inside the loop and then checks the end condition. So, the end condition is checked at the beginning of a 'while' loop, but at the end of a 'do-while' loop. What this means is, it is possible for a 'while' loop to not run at all, but a 'do-while' loop will always run at least once.

Answered by Ompravassahoo
0

Answer:

Please mark me as brainliest

Explanation:

These statements are commonly called loops. Here, the main difference between a while loop and do while loop is that while loop check condition before iteration of the loop. On the other hand, the do-while loop verifies the condition after the execution of the statements inside the loop.

Similar questions