main.c 660 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #include <stdio.h>
  2. static int input_test(void);
  3. int main()
  4. {
  5. char c1 = 'A';
  6. char c2 = 'B';
  7. char c3 = 'C';
  8. //puts(&c1);
  9. //char s[] = {'A', 'B', 'C', 0};
  10. char *s = "hello world";
  11. printf("hello: %-20s asfqwef\n", s);
  12. printf("%#d = %#x = %#o\n", 100, 100, 100);
  13. long long val = 0x1234567890adcdef;
  14. printf("%#lx\n", val);
  15. input_test();
  16. return 0;
  17. }
  18. // ввод символов
  19. static int input_test(void)
  20. {
  21. char c1, c2;
  22. //c = getchar();
  23. //printf("code: %#X: ", c);
  24. scanf("%c%*c", &c1);
  25. printf("code1: %d\n", c1);
  26. scanf("%c", &c2);
  27. printf("code2: %d\n", c2);
  28. return 0;
  29. }