#include <stdbool.h>

可以使用bool和true、false

输出是1或者0

 1 #define _CRT_SECURE_NO_WARNINGS
 2 
 3 #include<stdio.h>
 4 #include<stdbool.h>
 5 
 6 main()
 7 {
 8     bool b = 6 > 5;
 9     bool t = true;
10 
11     t = 2;
12 
13     printf("%d
", b);//1
14 
15     system("pause");
16 }
原文地址:https://www.cnblogs.com/denggelin/p/5575436.html