Could you help me explain this result:
int b = 5, i = 0;
i = ++b + ++b + b++;
The actual result is 21 (run program)
In my opinion, the order of calculation is:
b++ (posfix): return 5 and b = 6
the first ++b: return 7 and b = 7
the second ++b: return 8 and b = 8
So the resuld should be: i = 7 + 8 + 5 = 20.
What wrong with my calculation ? anyone can help.
 
    