13_integer_literals.c 315 B

123456789101112131415161718192021
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int a = 24680;
  5. int b = 01234567;
  6. int c = 0x2468ac;
  7. int d = 0x2468AC;
  8. int e = 0b010101010101;
  9. printf("%d\n", a);
  10. printf("%d\n", b);
  11. printf("%d\n", c);
  12. printf("%d\n", d);
  13. printf("%d\n", e);
  14. return 0;
  15. }
  16. // vim: set expandtab ts=4 sw=3 sts=3 tw=80 :