Do-while Loop
· C programming supports three types of looping statements for loop, while loop and do...while loop. Among three do...while loop is most distinct loop compared to others.
· do...while is an exit controlled looping statement.
· do...while loop is used, when there is a need to check condition after execution of loop body.
· do...while loop in any case executes minimum once.
· Looping statements whose condition is checked after execution of its loop body is called as Exit controlled loop
· For example - consider a program to validate user input and run in loop until user feeds valid input. In this case the input statement should run minimum once and should repeat in loop until user provides valid input.
Flow Control
Syntax of do...while loop do { // Body of do while loop } while (condition);

How do...while loop works?
do...while loop works in two step.
1. Initially program control transfers to body of loop. It executes all statements inside loop body and transfers control to loop condition.
2. Loop condition contains set of relational and logical expressions. If conditional expression evaluates 1 (true) then loop repeats again otherwise if conditional expression evaluates 0 (false) loop terminates.
The above two steps are repeated until loop condition is met.
Example:
#include <stdio.h>
void main()
{
/* Loop counter variable declaration */
int n=1`;
do
{
/* Body of loop */
printf("%d ", n);
/* Update loop counter variable */
N = n + 1;
} while(n <= 20); /* Loop condition */
}