main()
{
int i=5;
do
{
printf(" i is %d\n", i);
}
while(--i);
}
The program result will look like this:
i is 5 i is 4 i is 3 i is 2 i is 1
The main difference between do and while is the time that expression is evaluated.
| Top | Master Index | Keywords | Functions |