fork(4) download
  1. #include <stdio.h>
  2.  
  3. void func(int &z)
  4. {
  5. printf("&z: %p", &z);
  6. }
  7.  
  8. int main(int argc, char **argv)
  9. {
  10. int x = 0;
  11. int &y = x;
  12.  
  13. printf("&x: %p\n", &x);
  14. printf("&y: %p\n", &y);
  15.  
  16. func(x);
  17.  
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0.01s 2724KB
stdin
Standard input is empty
stdout
&x: 0xbff3e5b0
&y: 0xbff3e5b0
&z: 0xbff3e5b0