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++;
  17. cout<< b<<endl;
  18. }
  19. }
  20.  
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
0x7fffb2a42f94
0x7fffb2a42f98
0x7fffb2a42f9c
0x7fffb2a42fa0
60
51
41
31
21