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