stdbool.h中对bool的定义,就是1和0,可以用%d输出。
#ifndef _STDBOOL
#define _STDBOOL
#define __bool_true_false_are_defined 1
#ifndef __cplusplus
#define bool _Bool
#define false 0
#define true 1
#endif /* __cplusplus */
#endif /* _STDBOOL */
bool按理说只有true和false,但是也可以是数字,只要非零默认是true,是0就是false
c语言没有bool类型,c++才定义了bool类型,%d也可以输出它的值,真为1,假为0