11_precedence.c 735 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int a;
  5. int b;
  6. int c;
  7. int d;
  8. int e;
  9. int f;
  10. int x;
  11. int y;
  12. a = 12;
  13. b = 34;
  14. c = 56;
  15. d = 78;
  16. e = 0;
  17. f = 1;
  18. printf("%d\n", c + d);
  19. printf("%d\n", (y = c + d));
  20. printf("%d\n", e || e && f);
  21. printf("%d\n", e || f && f);
  22. printf("%d\n", e && e || f);
  23. printf("%d\n", e && f || f);
  24. printf("%d\n", a && f | f);
  25. printf("%d\n", a | b ^ c & d);
  26. printf("%d, %d\n", a == a, a == b);
  27. printf("%d, %d\n", a != a, a != b);
  28. printf("%d\n", a != b && c != d);
  29. printf("%d\n", a + b * c / f);
  30. printf("%d\n", a + b * c / f);
  31. printf("%d\n", (4 << 4));
  32. printf("%d\n", (64 >> 4));
  33. return 0;
  34. }
  35. // vim: set expandtab ts=4 sw=3 sts=3 tw=80 :