Have another look at the precise location of your post-increment operator. There should be a big clue in the fact that your output doesn't include 10.