Advertisement
Guest User

Untitled

a guest
Apr 24th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. // Example program
  2. #include <iostream>
  3. #include <string>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. int* ptr = new int[10];
  9. for(int i=0;i<10;i++){
  10. ptr[i]=10-i;
  11. cout << (&*(&ptr[i])) << endl;
  12. }
  13.  
  14. int* p = &ptr[0];
  15. int pr = *p;
  16. cout << pr << endl;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement