Advertisement
dllbridge

Untitled

Jan 12th, 2025
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.58 KB | None | 0 0
  1.  
  2.  
  3. #include   <stdio.h>
  4.  
  5.  
  6.  
  7.  
  8.  
  9. ////////////////////////////////////////////////////////////
  10. int main()
  11. {
  12.    
  13.     int n  = 32,
  14.         nArr[99] = {10, 111, 2, 333, 4444};
  15.      
  16.     int *p = &nArr[4];
  17.        
  18.     printf("           nArr[4] = %d\n",  nArr[4]);    
  19.     printf("address of nArr[4] = %d\n", &nArr[4]);
  20.     printf("address of nArr[4] = %d\n",  p      );
  21.     printf("address of nArr[5] = %d\n", &nArr[5]);  
  22.     printf("address of nArr[6] = %d\n", &nArr[6]);
  23.     printf("address of nArr[7] = %d\n", &nArr[7]);                    
  24.        
  25. }
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40. /*
  41.  
  42. #include   <stdio.h>
  43.  
  44.  
  45.  
  46.  
  47.  
  48. ////////////////////////////////////////////////////////////
  49. int main()
  50. {
  51.    
  52.     int n  = 32,
  53.         nArr[99] = {10, 111, 2, 333};
  54.        
  55.     printf("size of nArr = %d\n", sizeof(nArr));               
  56.  
  57.     for(int i = 0; i < 30; i = i + 1)
  58.     {
  59.        printf("nArr[%2d] = %3d\n", i, nArr[i]);
  60.     }
  61. }
  62.  
  63. */
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82. /*
  83. #include   <stdio.h>
  84.  
  85.  
  86. int n  = 32;
  87. int n2 = 11;
  88. int foo(int);
  89.  
  90. ////////////////////////////////////////////////////////////
  91. int main()
  92. {
  93.    
  94.     n2 = n;
  95.     printf("n2 = %d\n", n2);               
  96.     n2 = foo(8);
  97.  
  98.     printf("n2 = %d\n", n2);
  99. }
  100.  
  101.  
  102.  
  103. ////////////////////////////////////////////////////////////
  104. int foo(int n3)
  105. {
  106.      
  107.        
  108.      
  109. return 50 + n3;    
  110. }
  111.  
  112. */
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119. /*
  120.  
  121. #include   <stdio.h>
  122.  
  123. extern int n;
  124.  
  125. ////////////////////////////////////////////////////////////
  126. int main()
  127. {
  128.    
  129.    
  130.                
  131.     printf("n = %d", n);    
  132.  
  133. return 0;
  134. }
  135.  
  136.  
  137. int n = 32;
  138. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement