
1 #include<stdio.h> 2 #include<stdbool.h> 3 main() 4 { 5 bool b = 6>5; 6 bool c = true; 7 c = 4;//bool类型里非0数都是true,都会输出1 8 printf("b=%d,c=%d",b,c); 9 return 0; 10 }
逻辑运算
三目运算符(尽量少用)和逗号运算符
逗号运算符
多路分支