Advertisement
dllbridge

Untitled

May 27th, 2024
780
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1.  
  2.  
  3. #include<stdio.h>
  4.  
  5.  
  6. /////////////////////////////////////////////////////////
  7. void foo(int *p)
  8. {
  9.    
  10.        for(int i=0;i < 9;i++)
  11.        {
  12.                printf("arr[%d] = %d\n", i, p[i]);
  13.        }
  14.            
  15. }
  16.  
  17.  
  18.  
  19. /////////////////////////////////////////////////////////
  20. int main()
  21. {
  22.    
  23.     int arr[11]={0,1,2,3,4,5,6,7,8,9,10};
  24.    
  25.    
  26.     foo(&arr[2]);
  27.  
  28.     printf("sizeof(int) = %d\n",sizeof(int));
  29. }
  30.  
  31.  
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement