fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int a = 1, b = 0;
  5.  
  6. printf("Logical AND (a && b): %d\n", a && b);
  7. printf("Logical OR (a || b): %d\n", a || b);
  8. printf("Logical NOT (!a): %d\n", !a);
  9. printf("Logical NOT (!b): %d\n", !b);
  10.  
  11. return 0;
  12. }
Success #stdin #stdout 0s 5276KB
stdin
Standard input is empty
stdout
Logical AND (a && b): 0
Logical OR (a || b): 1
Logical NOT (!a): 0
Logical NOT (!b): 1