This chunk of code is in a exercise from the book named C programming-A Modern Approach.
for(i=10;i>=1;i/=2)
{
printf("%d", i++);
}
Edited:
The first output should be 10 and it should increase by 1 for the next step in the loop.But when i run this code all i get is 1 and it never ceases to print 1.
Please help me understand this code.
This code says
So:
Execution order of for loops:
Of course the order [1],[2],[3] is repeated until [1] is not true anymore