1 | #include <stdbool.h> |
2 | #include <stdint.h> |
3 | #include <stdio.h> |
4 | #include <stdlib.h> |
5 | |
6 | struct foo |
7 | { |
8 | uint8_t first_val; |
9 | uint32_t second_val; |
10 | uint64_t third_val; |
11 | bool fourth_val; |
12 | }; |
13 | |
14 | int main () |
15 | { |
16 | int val = 100; |
17 | struct foo mine = {55, 5555, 55555555, false}; |
18 | struct foo *ptr = (struct foo *) malloc (size: sizeof (struct foo)); |
19 | ptr->first_val = 66; |
20 | ptr->second_val = 6666; |
21 | ptr->third_val = 66666666; |
22 | ptr->fourth_val = false; |
23 | |
24 | // Stop here and set values |
25 | printf(format: "Val - %d Mine - %d, %d, %llu, %d. Ptr - %d, %d, %llu, %d\n" , val, |
26 | mine.first_val, mine.second_val, mine.third_val, mine.fourth_val, |
27 | ptr->first_val, ptr->second_val, ptr->third_val, ptr->fourth_val); |
28 | |
29 | // Stop here and check values |
30 | printf (format: "This is just another call which we won't make it over %d." , val); |
31 | return 0; // Set a breakpoint here at the end |
32 | } |
33 | |