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;
  18. }
  19. }
  20.  
Success #stdin #stdout 0.01s 5296KB
stdin
Standard input is empty
stdout
0x7ffd855344740x7ffd855344780x7ffd8553447c0x7ffd8553448060
51
41
31
21