Advertisement
dllbridge

Untitled

Nov 8th, 2024
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.38 KB | None | 0 0
  1.  
  2. #include <stdio.h>
  3.  
  4.  
  5. ////////////////////////////////////////////////////////////
  6. int main()
  7. {
  8.     int array[10] = { 5, 14, 15, 121, 35, 70, 45, 77, 200, 210 };
  9.    
  10.     int &r = array[3];
  11.    
  12.     printf("r = %d\n", r);
  13.    
  14.    
  15.     int *p = &r;
  16.    
  17.    
  18.     for (int i = 0; i < 10; i++)
  19.     {
  20.         printf("array[%2d] = %3d \n", i  , p[i]);
  21.     }
  22.  
  23. }
  24.  
  25.  
  26.  
  27.  
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement