fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int arr[3] = {1,2,3};
  7.  
  8. int *vp = arr;
  9.  
  10. for(int i=0; i<3; i++)
  11. {
  12. cout << *(vp+i) << endl;
  13. }
  14.  
  15. return 0;
  16.  
  17. }
  18.  
Success #stdin #stdout 0s 3412KB
stdin
Standard input is empty
stdout
1
2
3