gpt4 book ai didi

c - _C99的Bool数据类型

转载 作者:太空狗 更新时间:2023-10-29 15:45:02 25 4
gpt4 key购买 nike

C 编程语言的 C99 标准将 _Bool 数据类型定义为另一种数据类型的宏(因为该语言无法处理类型安全的 boolean 值)。

_Boolunsigned charunsigned int 还是其他数据类型的宏?

最佳答案

_Bool 是一个独立的整数类型,符合 C 标准。 _Bool 是 C 语言的关键字

2 An object declared as type _Bool is large enough to store the values 0 and 1.

_Bool 是无符号整数类型。

The type _Bool and the unsigned integer types that correspond to the standard signed integer types are the standard unsigned integer types.

还有一点值得一提

— The rank of _Bool shall be less than the rank of all other standard integer types.

关于c - _C99的Bool数据类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24602814/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com