fork download
  1. #include <iostream>
  2. int* foo() {
  3. int i = 3;
  4. return &i;
  5. }
  6. void bar() {
  7. int k = 8;
  8. }
  9.  
  10. int main(int argc, char ** args) {
  11. int *i = foo();
  12. bar();
  13. std::cout << *i ;
  14. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
Standard output is empty