fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int& fun2(int &z)
  5. {
  6. z++;
  7. return z;
  8. }
  9.  
  10. int main() {
  11. // your code goes here
  12. int x = 5;
  13. fun2(fun2(x));
  14.  
  15. cout<<x<<endl;
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
7