11 views
int a=5;

a= --a+a++;

Then value of a is ?
| 11 views
0
Is it C?

If yes, then invalid question. It's undefined behaviour.

If no, and it's abstract example then,

+ Is left associative, so, --a should be evaluated first, which will set $a=4$ and this 4 will be used, now for the right part, a++ will be evaluated so, a becomes 5 but old value is used so, $a=4$ for right hand side of the +.

So, it becomes $a=4+4;$ So, $a =8$.