When is do while loop preferred to while loop in c?
Answers
Answered by
0
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
0
when the loop body is needed to be printed atleast once,do while loop is preferred
Similar questions