Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3.  
  4. void f(int pi[])
  5. {
  6.     int a[]={1,2,3,4,5};
  7.     pi = a;
  8.     int* p = a;
  9.     int* q = pi;
  10.     std::cout << *p << " "<< *q << " "<< *pi << " ";
  11. }
  12. int _tmain(int argc, _TCHAR* argv[])
  13. {
  14. int pi[]= {1,2,3,6,7};
  15.  f(pi);
  16.     system("pause");
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement