Using boolean values in C

前端 未结 18 2045
被撕碎了的回忆
被撕碎了的回忆 2020-11-22 12:51

C doesn\'t have any built-in boolean types. What\'s the best way to use them in C?

18条回答
  •  迷失自我
    2020-11-22 12:59

    A boolean in C is an integer: zero for false and non-zero for true.

    See also Boolean data type, section C, C++, Objective-C, AWK.

提交回复
热议问题