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<5; i++)
  15. { *b=*b+1;
  16. b++;
  17. }
  18. }
  19.  
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
61
51
41
31
21