fork download
  1. #include <stdio.h>
  2.  
  3. struct A {
  4. struct A * first;
  5. int value;
  6. };
  7.  
  8. int main () {
  9. struct A a = { &a };
  10. a.first -> value = 123;
  11.  
  12. static struct A b = { &b };
  13. b.first -> value = 456;
  14.  
  15. printf("&a = %p, a.first = %p\n", &a, a.first);
  16. printf("&b = %p, b.first = %p\n", &b, b.first);
  17. }
  18.  
Success #stdin #stdout 0s 2112KB
stdin
Standard input is empty
stdout
&a = 0xbfc0ec48, a.first = 0xbfc0ec48
&b = 0x80497b0, b.first = 0x80497b0