++i happens before calculating the whole expression and i++ happens after.
In the first example one of increments happen before calculating the value, so "i" becomes 21 and you get 21 + 21. In the last example both happen before, so "i" becomes 22 and you get 22 + 22.