开发者

The ambiguity in the outputs of different C compilers [duplicate]

开发者 https://www.devze.com 2023-03-31 18:55 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: Undefined Behavior and Sequence Points
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

Undefined Behavior and Sequence Points

Which 'C' compiler gives the logically correct answers... I mean Turbo C older version or the newer one named as Borland cpp 4.5 and above?

T开发者_如何学Gohe different outputs of the question { int i=5;printf(i++*++i);} made me ask this.


No C compiler will give a correct answer.

The most correct answer would be to detect nonsense of this kind and refuse to compile it with an error message.

0

精彩评论

暂无评论...
验证码 换一张
取 消