On Undefined Behavior

前端 未结 7 2185
盖世英雄少女心
盖世英雄少女心 2021-01-02 04:14

Generally, UB is regarded as being something that has to be avoided, and the current C standard itself lists quite a few examples in appendix J.

However, there are c

7条回答
  •  孤城傲影
    2021-01-02 04:25

    No! Just because it compiles, runs and gives the output you hoped for does not make it correct.

提交回复
热议问题