do while

do while :
           The do while is a exit control looping statement. First it will enter into the body execute one time the statement and it will check the condition,if the condition is non-zero,then it once again re-entered into the loop and this process will takes place until the condition will be dis-satisfy.
SYNTAX :
initialization;
do
{
statement 1;
statement 2;
statement n;
}
while(condition);

points to remember :
1) In do while the valid condition must have the semi column (;).
2) do while can also write with out body and with semi column.

Examples :
with body:

#include<stdio.h >
#include<conio.h>
 main()
{
int a=1;
do
{
printf("\t%d",a);
a++;
}
while(a<=10);
}

OUTPUT :
1 2  3  4  5  6  7  8  9  10

With out body :
                               When ever we define with out body after loop we replaced with body with in the body one statement will  takes place.but after the loop closed immediately while has to exist with semi column.

#include<stdio.h>
main()
{
int i=10;
do
printf("%d",--i);
while(i>=1);
}

OUTPUT :9876543210

with semi column :
#include<stdio.h>
main()
{
int i=1;
do
while(i++<=1);
while(i++<=3);
while(i++<=5);
printf("%d",i);
getch();
}
OUTPUT :
7