No, that's not correct. It doesn't matter if you pre-increment or post-increment the value in the for loop because its return value is not evaluated. In other words, you are not assigning it to anything.i think 10 should be printed because there is a difference between X++ and ++X. i can show you that by this program:
It basically looks like:
Code:for(int x = 0; x < 10; ++x) cout << x << endl; // is the same as... int x = 0; while(x < 10) { cout << x << endl; ++x; // notice that it doesn't matter if you have ++x or x++ }