fork download
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. int &fun()
  5. {
  6. int x = 10;
  7. return x;
  8. }
  9. int main()
  10. {
  11. fun() = 30;
  12. cout << fun();
  13. return 0;
  14. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
Standard output is empty