1 | #include <stdio.h> |
---|---|
2 | |
3 | struct SubStruct |
4 | { |
5 | int a; |
6 | int b; |
7 | }; |
8 | |
9 | struct MyStruct |
10 | { |
11 | int first; |
12 | struct SubStruct second; |
13 | }; |
14 | |
15 | int |
16 | main() |
17 | { |
18 | struct MyStruct my_struct = {.first: 10, .second: {.a: 20, .b: 30}}; |
19 | struct MyStruct *my_pointer = &my_struct; |
20 | struct MyStruct *null_pointer = nullptr; |
21 | printf (format: "Stop here to evaluate expressions: %d %d %p\n", my_pointer->first, my_pointer->second.a, my_pointer); |
22 | return 0; |
23 | } |
24 | |
25 | |
26 | |
27 |