fork(14) download
  1. #include <iostream>
  2.  
  3. struct A {
  4. int a;
  5. int b;
  6. int c;
  7. int d;
  8. };
  9.  
  10. A create(int i) {
  11. A a = {i, i+1, i+2, i+3 };
  12. std::cout << &a << "\n";
  13. return a;
  14. }
  15.  
  16. int main(int argc, char*[]) {
  17. A a = create(argc);
  18. std::cout << &a << "\n";
  19. }
Success #stdin #stdout 0.01s 2724KB
stdin
Standard input is empty
stdout
0xbf928684
0xbf928684