void main()
{
int i;
for(i = 0; i <= 10; ++i);
printf("%d ", i);
}
In the above program , we are pre-incrementing i, even though the output is 1-10 , which is the case for post increment.Why?? I mean why the output is same whether we pre-increment or post - increment the i's value.


and ...

void main()
{
int i;

for(i = 1; i <= 5;printf("\n%d ", i))
{

i++;
}

}// why the output is 2 3 4 5 6..... it would have to first initialize the value i then compare , then print and then it would have to enter the loop , where the value of i would get incremented.