fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int change (int& y)
  6.  
  7. {
  8. y=20;
  9. }
  10.  
  11. int main(){
  12.  
  13. int x = 10;
  14.  
  15. change(x);
  16.  
  17. cout << x;
  18.  
  19. }
Success #stdin #stdout 0s 5520KB
stdin
Standard input is empty
stdout
Standard output is empty