There are three terms in the sum. The value of the first term is 10, the value of the postincrement operator. "i" is then incremented, so its value is 11. Then the value of the second term is 12; that's the value of the preincrement operator (11 + 1), and i is now 12. The sum after two terms is 22. Then you add i--, which is also 12: again, the postdecrement operator returns the unmodified value. 10 + 12 + 12 is 34.
[ Gaaah! Fixed typo ] [ August 05, 2008: Message edited by: Ernest Friedman-Hill ]