11 signed negative = -100;
13 unsigned positive = 100;
15 long long trillion = 1000000000000;
17 unsigned long long int neg_trillion = -1000000000000;
19 short two_bytes = 65000;
24 printf(" the_answer = %d\n", the_answer);
25 printf(" positive = %d\n", positive);
26 printf(" negative = %u\n", negative);
27 printf(" trillion = %lld\n", trillion);
28 printf(" neg_trillion = %lld\n", neg_trillion);
29 printf(" two_bytes = %hd\n", two_bytes);
30 printf(" one_byte = %hhd\n", one_byte);
36 int8_t signed_8bit = 1;
38 uint8_t unsigned_8bit = 2;
40 int64_t signed_64bit = 3;
42 uint64_t unsigned_64bit = 4;
44 printf("Standard Ints\n");
45 printf(" signed_8bit = %hhd\n", signed_8bit);
46 printf(" unsigned_8bit = %hhu\n", unsigned_8bit);
47 printf(" signed_6bit_ = %ld\n", signed_64bit);
48 printf(" unsigned_64bit = %lu\n", unsigned_64bit);
60 printf("Standard Ints\n");
61 printf(" as integers = %2d %2d %2d\n", a_char, a_int, a_hex);
62 printf(" as chars = %2c %2c %2c\n", a_char, a_int, a_hex);
63 printf(" as hex = %2x %2x %2x\n", a_char, a_int, a_hex);
69 int fixed_size[100] = {1, 2, 3};
71 int auto_sized[] = {1, 2, 3};
78 printf("Array sizes\n");
79 printf(" fixed_size = %zd\n", sizeof(fixed_size));
80 printf(" auto_sized = %zd\n", sizeof(auto_sized));
81 printf(" table size = %zd\n", sizeof(tables));
82 printf(" first = %d\n", fixed_size[0]);
83 printf(" third = %d\n", fixed_size[2]);
84 printf(" last = %d\n", fixed_size[99]);
85 printf(" tables = %d\n", tables[0][0]);
91 char hello_char[] = {'h', 'e', 'l', 'l', 'o', '\0'};
93 char hello_str[] = "hello";
95 char *hello_ptr = "hello";
98 printf(" as strings = %s %s %s\n",
102 printf(" as arrays = %c %c %c\n",
106 printf(" sizes = %zd %zd %zd\n",
124 printf(" one = %d\n", one);
125 printf(" two = %d\n", two);
126 printf(" pointer = %llx\n", (long long)pointer);
127 printf(" pointer = %p\n", pointer);
128 printf(" value = %d\n", *pointer);