0

According to my understanding, the previous value is used for evaluation of an expression when postfix operator is used.

Consider the following code

int a = 11; int d;

case 1:d = a++ + ++a;output d has value 24

case 2: d = a++ + a++; output d has value 22

case 3: d = a + a++ + ++a; output d has value 34

case 4: d = a++ + ++a + a; output d has value 36

The order in which a is updated with the incremented value used for computation is inconsistent. I want to know the exact time the value is incremented during post increment.

0 Answers0