Give four differences between for, while and do while loop.
Answers
Answered by
1
The difference is in when the condition gets evaluated. In a do..while loop, the condition is not evaluated until the end of each loop. That means that a do..while loop will always run at least once. ... In the do..while loop, it isn't checked until the end of the first loop, so you get the result you expect.
Similar questions