Download Here [pdf] C Programming
Do While Loop in C
When it is necessary to executive a loop at least once than we use do while loop. In do while loop the body is executed before checking the condition.
The General Format is:
do
{
// body to repeat
}
while(condition);
Example:
C program to print 1 to 100
#include<stdio.h>
#include<conio.h>
void main()
{
int i=1;
do
{
printf(“%d”,i);
}
while(i<=100);
}