-1

I know the concept of post increment but how does it apply to the follow? The output of t is 10. How to explain the undefined behavior?

int a = 2;
int b = 3;
int t;
t = a++ * (a+b); 
MLAC
  • 129
  • 2
  • 9

1 Answers1

0

That is undefined behavior you have there.

juzzlin
  • 41,671
  • 5
  • 31
  • 42