i initial value: 0; value returned by i++: 0, i after: 1. i initial value: 0; value returned by ++i: 1, i after: 1. So basically ++i returns the value after it is incremented, while i++ return the value before it is incremented. At the end, in both cases the i will have its value incremented. More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.