fork download
  1. #include <cstdio>
  2.  
  3. void f()
  4. {
  5. {
  6. int p1 = 10;
  7. printf("p1 = %d, address = %p\n", p1, &p1);
  8. }
  9.  
  10. {
  11. int p2 = 20;
  12. printf("p2 = %d, address = %p\n", p2, &p2);
  13. }
  14. }
  15.  
  16. int main() {
  17. f();
  18. return 0;
  19. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
p1 = 10, address = 0xffd24c8c
p2 = 20, address = 0xffd24c8c