实例 C 语言逻辑运算符 逻辑与

x
 
#include <stdio.h>
int main() {
  int x = 5;
  int y = 3;
  
  // Returns 1 (true) because 5 is greater than 3 AND 5 is less than 10
  printf("%d", x > 3 && x < 10);
  return 0;
}
                    

输出结果

1