1 | #include <stdio.h> |
---|---|
2 | #include <stdlib.h> |
3 | #include <string.h> |
4 | |
5 | struct referent { |
6 | const char *p; |
7 | }; |
8 | |
9 | int main (int argc, char const *argv[]) |
10 | { |
11 | const char *my_ptr = strdup(s: "hello"); |
12 | struct referent *r = malloc(size: sizeof(struct referent)); |
13 | r->p = my_ptr; |
14 | |
15 | printf(format: "%p\n", r); // break here |
16 | |
17 | return 0; |
18 | } |
19 |