Advertisement
GreMendes

ex1

Aug 18th, 2014
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. void func(int *ptr){
  4.  
  5.     for(int i = 0; i < 5; i++){
  6.         std::cout << ptr[i] << endl;
  7.  
  8.     }
  9.  
  10. int main(){
  11.  
  12.     int *ptr;
  13.     int a[5];
  14.    
  15.     ptr = &a;
  16.    
  17.     func(&ptr);
  18.  
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement