IF, WHILE, DO/WHILE, and FOR statements

Note the differences between these sets of statements:

int i;
i = 0;

if ( i < 10 )
{
   printf("i is %d\n", i);
   i = i + 1;
}
printf("i finishes at %d\n", i);
int i;
i = 0;

while ( i < 10 )
{
   printf("i is %d\n", i);
   i = i + 1;
}
printf("i finishes at %d\n", i);
int i;
i = 0;

do
{
   printf("i is %d\n", i);
   i = i + 1;
} while ( i < 10 );
printf("i finishes at %d\n", i);
int i;


for ( i = 0; i < 10; i++ )
{
   printf("i is %d\n", i);
}

printf("i finishes at %d\n", i);
int i;
i = 0;

do
{
   i = i + 1;
   printf("i is %d\n", i);   
} while ( i < 10 );
printf("i finishes at %d\n", i);
int i;


for ( i = 1; i <= 10; i++ )
{
   printf("i is %d\n", i);
}

printf("i finishes at %d\n", i);

What is the output of each block of code? How many lines does each loop print?

What happens in each case if the loop variable starts at 10 instead of at the given value?