The first thing that happens is the pre-increment is evaluated.
++a happens twice which makes a 12.
second, a is divided by a which yields 1.
third the additive operators are evaluated. you have three 12's and one 1, so the answer is 37.
finally, the post-increment (a++) is evaluated bringing the value of a to 13.
This post has been edited by GWatt: 19 December 2008 - 10:14 AM
Note that this is all undefined behaviour. Theoretically, there is no correct value, because there is no defined evaluation order for these kinds of expressions (The outcome depends entirely on your compiler)
This post has been edited by Bench: 19 December 2008 - 10:33 AM