fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int& f()
  5. {
  6. int i = 1;
  7. return i;
  8. }
  9.  
  10. const int& g()
  11. {
  12. int i = 2;
  13. return i;
  14. }
  15.  
  16. const int& h()
  17. {
  18. return 3;
  19. }
  20.  
  21. int main() {
  22.  
  23. cout << f() << endl;
  24. cout << g() << endl;
  25. cout << h() << endl;
  26.  
  27. return 0;
  28. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
0
0
0