C99布尔数据类型? [英] C99 boolean data type?
本文介绍了C99布尔数据类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
什么是布尔C99的数据类型以及如何使用它?
What's the C99 boolean data type and how to use it?
推荐答案
#include <stdbool.h>
int main(void){
bool b = false;
}
宏真正
和假
扩展到 1
和 0
分别。
科 7.16
布尔类型和值&LT; stdbool.h&GT;
Section 7.16
Boolean type and values < stdbool.h >
- 1头
&LT; stdbool.h方式&gt;
德网络网元4个宏 - 2宏
- 布尔
扩大到_Bool。
- 1 The header
<stdbool.h>
defines four macros. - 2 The macro
- bool expands to _Bool.
- 真:它扩展成整型常量1,
- 假:它扩展成整型常量0和
- __ bool_true_false_are_defined
它扩展成整型常量1。
这篇关于C99布尔数据类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
- 布尔
查看全文