fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void change(int* b);
  5. int main()
  6. { int a[5]={20,30,40,50,60};
  7. change(a);
  8. for (int i=4; i>=0; i--)
  9. cout<<a[i]<<endl;
  10. return 0;
  11. }
  12.  
  13. void change(int* b)
  14. { for (int i=0; i<4; i++)
  15. { *b=*b+1;
  16. b+=1;
  17. }
  18. }
  19.  
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
60
51
41
31
21