Do while loop is a post – tested loop. It is similar to while loop expect it executes its body at least once weather the condition is true or false. The do while loop terminates when the text expression is evaluated to be zero.
while (condition );
int main ()
Output: 1 2 3 4 5 6 7 8 9 10
The do-while loop is mainly used in the case where we need to execute the loop at least once. The do-while loop is mostly used in menu-driven programs where the termination condition depends upon the end user.
AUTHOR- SOURAV PURKAITDisclaimer: The author(s) of this blog are solely responsible for the content posted. The blog platform serves as a medium for their expression, and the platform administrators assume no liability for the accuracy or legality of the content.