C99的_Bool数据类型(C)的 [英] _Bool data type of C99 (C)
问题描述
C编程语言的C99标准定义了_Bool数据类型为另一个数据类型的宏(如语言不能够处理一个类型安全的布尔值)。是_Bool为unsigned char型,unsigned int类型或某种其他数据类型的宏?
The C99 standard of the C programming language defines the _Bool data type as a macro for another data type (as the language isn't able to deal with a type safe boolean). Is the _Bool a macro for unsigned char, unsigned int or some other data type?
推荐答案
_Bool
是根据C标准的独立integere类型。 _Bool
是C语言的关键字
_Bool
is a separate integere type that according to the C Standard. _Bool
is a keyword of the C language.
2目的声明为类型_Bool是大到足以存储值
0和1
2 An object declared as type _Bool is large enough to store the values 0 and 1.
_Bool
是无符号整数类型。
这是对应的类型_Bool和无符号整型
标准符号整数类型是标准的无符号整数类型。
The type _Bool and the unsigned integer types that correspond to the standard signed integer types are the standard unsigned integer types.
和那里应该提到的是
- _Bool的等级应低于所有其他标准的等级
整数类型。
— The rank of _Bool shall be less than the rank of all other standard integer types.
这篇关于C99的_Bool数据类型(C)的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!