[Solved] How does increments the integer in (all) loops work? [closed]


In a for loop,

for (a;b;c){
   // code d
}

1) It runs statement a first.

2) Then checks statement b.

3a) If b fails it exits the loop.

3b) If it passes, it executes d ONCE. If at any point in d does it exit (eg. break), it will not do anything else in the loop. If it does not break and completes all the code in d, then it runs statement c once.

3) repeat steps 2, 3 until 3a is true.

2

solved How does increments the integer in (all) loops work? [closed]