Computer Science, asked by TbiaSamishta, 11 months ago

What is the difference between while and do-while statements.

Answers

Answered by nehadav98
1
In a do..while loop, the condition is not evaluated until the end of each loop. ... Do while loop will 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.
Answered by Sidyandex
0

A while statement is used to execute a command only if a certain statement is true and the condition can be fulfilled.

The do while statement is used to, on the other hand, execute statements even if the condition given is not true.

The while statement doesn't execute if the condition is false.

The do while statement executes at least once even if the condition is not true.

Similar questions