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

x
 
#include <stdio.h>
int main() {
  int x = 5;
  int y = 3;
  
  // Returns false (0) because ! (not) is used to reverse the result
  printf("%d", !(x > 3 && x < 10));
  return 0;
}
                    

输出结果

0