fork(1) download
  1. #include <iostream>
  2.  
  3. const char* f()
  4. {
  5. return "Hello";
  6. }
  7.  
  8. int main()
  9. {
  10. auto s1 = f();
  11. auto* s2 = f();
  12.  
  13. std::cout << s1 << std::endl;
  14. std::cout << s2 << std::endl;
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
Hello
Hello