but final value of a will be 102 as post increment
Can you explain why it is incrementing to 102?
From my understanding I’m getting the answer 153 as follows:
a = (a++) + (++b);
resulting in a =101 like you. But how come its post incrementing again to 102? Am I missing something?
Then finally:
b = (b++) + (++a);
b= 51 + 102 (a is pre-incremented now)
b = 153
Please correct me if I’m wrong.