Computer Science, asked by manideepR2203, 1 year ago

In while loop test condition is always true or false

Answers

Answered by Sonalibendre
1



Contrast with the while loop, which tests the condition before the code within the block is executed, the do-while loop is an exit-condition loop. This means that the code must always be executed first and then the expression or test condition is evaluated. If it is true, the code executes the body of the loop again.

Answered by UrvashiBaliyan
2

As in while loop, if the controlling condition becomes false in the first iteration only, then the body of the while loop is not executed at all. ... The do-while loop executes the body of the loop at least once even if the condition is false at the first attempt. The general form of do-while is as follows.

Similar questions