Advertisement
adelinedel

Journal 7A Inro to Pointers

Apr 24th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. /*Adeline Delgleize
  2. Student ID 0515277
  3. Journal 7A
  4. Introduction to Pointers
  5. Reverse Array Numbers
  6. April 24, 2017*/
  7.  
  8. #include<iostream>
  9.  
  10. using namespace std;
  11.  
  12.  
  13. int main()
  14. {
  15.  
  16. int *p;
  17.  
  18. int ar[] = { 1,2,3,4,5,6,7,8,9,10};
  19.  
  20. p = &ar[9];
  21.  
  22. for (int i = 0; i < 10; i++)
  23. cout << *p-- << endl;
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30. return 0;
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement