++i increases the index prior to the loop body executes and i++ increases the index after the loop body executes.
The above is untrue - please check the manual: for loop - cppreference.com
“…which is executed after every iteration of the loop and before re-evaluating condition. Typically, this is the expression that increments the loop counter”