fork(1) download
  1. #include <stdio.h>
  2.  
  3. typedef struct test {
  4. char field1[20];
  5. char *field2;
  6. } test_s;
  7.  
  8. test_s test = {.field1[0] = '\0', .field2 = test.field1};
  9.  
  10. int main(void) {
  11. printf("%p\n%p\n", (void*) test.field1, (void*)test.field2);
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0s 10304KB
stdin
Standard input is empty
stdout
0x2b124eaad040
0x2b124eaad040