The while loop makes a test of condition before the loop is executed. Therefore, the body of the loop may not be executed at all, if the condition is not satisfied at first attempt. In some situations it may be necessary to execute the body of the loop before the test condition is performed, such a situation the do..while loop is useful.
It is also repetitive control structure and executes the body of the loop once irrespective of the condition, then it checks the condition and continues the execution until the condition becomes false.
Do while loop
Run Example >
int i=1, sum=0;
printf("sum of the numbers upto 10 is %d",sum);