The loop will execute 4 times. Increments are made before the test of the next loop.
Code:int main(void) { int i, x=0,n=0; for( i = 0; i < 11; i += 3) { x += i;++n; } printf("loop counter: %d\n",n); return 0; }
The loop will execute 4 times. Increments are made before the test of the next loop.
Code:int main(void) { int i, x=0,n=0; for( i = 0; i < 11; i += 3) { x += i;++n; } printf("loop counter: %d\n",n); return 0; }