In c, in bool, true == 1 and false == 0?

前端 未结 2 1610
醉梦人生
醉梦人生 2021-02-14 19:07

Just to clarify I found similar answer but for C++, I\'m kinda new to coding so I\'m not sure whether it applies to C as well.

2条回答
  •  清酒与你
    2021-02-14 19:41

    More accurately anything that is not 0 is true.

    So 1 is true, but so is 2, 3 ... etc.

提交回复
热议问题