a++ + a++
it first calculates a + a then does ++ twice
think of it like
a = 3 + 3
a = 6++ ++
a = 7++
8
++a + ++a
it first does ++a twice, then a + a
a = ++ ++3
a = ++4
a = 5
a = 5 + 5
10
it first calculates a + a then does ++ twice
think of it like
a = 3 + 3
a = 6++ ++
a = 7++
8
++a + ++a
it first does ++a twice, then a + a
a = ++ ++3
a = ++4
a = 5
a = 5 + 5
10