what will be the value of x? x= a++ + ++a + a++ [duplicate]
Possible Duplicate:
Undefined Behavior and Sequence Points
What will the value of x in following line of code:- x = a++ + ++开发者_运维百科a + a++ actually compiler is giving x = 3..but how????
This is undefined behavior. Any answer is valid, up to and including crashing. It is unlikely that any particular answer will be consistent between platforms. Don't do this.
Undefined behavior, as the value of a
is modified multiple time in the same statement.
精彩评论