true false

 1 #include<stdio.h>
 2 
 3 int main(void)
 4 {
 5     /*
 6         true    1
 7         false    0
 8     */
 9 
10     printf("%d
", 5 == 3);
11     printf("%d
", 5 > 3);
12     printf("%d
", 5 <= 3);
13 
14     return 0;
15 }

 1 #include<stdio.h>
 2 #include<stdbool.h>  //定义布尔量时使用
 3 
 4 int main(void)
 5 {
 6     bool b = 6 > 5;
 7 
 8     bool t = true;
 9     t = 2;
10 
11     printf("%d
", b);
12     printf("%d
", t);
13 
14     return 0;
15 }

原文地址:https://www.cnblogs.com/2018jason/p/11776701.html