Why is a still 0 after the following operation?
a
0
int a = 0; a+=a++;
a++ increments a but returns its previous value 0.
a++
That's why a+=a++, which is equivalent to a=a+a++, sets a back to 0+0;
a+=a++
a=a+a++
0+0