1 | #include <stdio.h> |
2 | struct Summarize |
3 | { |
4 | int first; |
5 | int second; |
6 | }; |
7 | |
8 | typedef struct Summarize summarize_t; |
9 | typedef summarize_t *summarize_ptr_t; |
10 | |
11 | summarize_t global_mine = {.first: 30, .second: 40}; |
12 | |
13 | struct TwoSummarizes |
14 | { |
15 | summarize_t first; |
16 | summarize_t second; |
17 | }; |
18 | |
19 | int |
20 | main() |
21 | { |
22 | summarize_t mine = {.first: 10, .second: 20}; |
23 | summarize_ptr_t mine_ptr = &mine; |
24 | |
25 | TwoSummarizes twos = { .first: {.first: 1,.second: 2}, .second: {.first: 3,.second: 4} }; |
26 | |
27 | printf (format: "Summarize: first: %d second: %d and address: 0x%p\n" , mine.first, mine.second, mine_ptr); // Set break point at this line. |
28 | printf (format: "Global summarize: first: %d second: %d.\n" , global_mine.first, global_mine.second); |
29 | return 0; |
30 | } |
31 | |
32 | |
33 | |