开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜