According to syntax postfix increment returns copy of unmodified variable (C++ == C), while prefix increment returns incremented variable (++C == C + 1).
According to syntax postfix increment returns copy of unmodified variable (C++ == C), while prefix increment returns incremented variable (++C == C + 1).
Postfix increments variable too, but as a side effect. in your code
cout << i++ << endl;
prints 10 which means, that i++ returned copy of unincremented i.