Advertisement
dllbridge

Untitled

Jul 17th, 2024
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.46 KB | None | 0 0
  1.  
  2. #include <stdio.h>
  3.  
  4.  
  5.  
  6.  
  7.  
  8. /////////////////////////////////////////////////////////
  9. int main()
  10. {
  11.     int *p;
  12.     int nArr[99] = {0, 1, 2,3,4,5,6,7,8,9};
  13.    
  14.    *p = nArr[3];
  15.  
  16.     printf("*p = %d\n", *p);
  17.  
  18. }  
  19.    
  20.    
  21.    
  22.    
  23.    
  24.    
  25.    
  26.    
  27.    
  28.    
  29.    
  30.    
  31.    
  32.    
  33.    
  34.    
  35.    
  36.    
  37.    
  38.    
  39.    
  40.  
  41.  
  42. /*
  43.  
  44.  
  45. #include <stdio.h>
  46.  
  47.  
  48.  
  49.  
  50.  
  51. /////////////////////////////////////////////////////////
  52. int main()
  53. {
  54.     int *p;
  55.     int nArr[99] = {0, 1, 2,3,4,5,6,7,8,9};
  56.    
  57.     p = nArr;
  58.    
  59.     for(int i=0; i < 10; i++)
  60.     {
  61.         printf(" =  %d\n", p[i]);
  62.     }  
  63. }
  64.  
  65.  
  66. */
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85. /*
  86. #include <stdio.h>
  87.  
  88.  
  89.  
  90.  
  91.  
  92. /////////////////////////////////////////////////////////
  93. int Palast(int *p)
  94. {
  95.    
  96.     p = p - 7;
  97.    
  98.     int nSumma = 0;
  99.    
  100.     for(int i=0; i < 10; i++)
  101.     {
  102.         nSumma += p[i];
  103.     }  
  104.    
  105.  
  106.  
  107. return nSumma;
  108. }
  109.  
  110.  
  111. /////////////////////////////////////////////////////////
  112. int main ()
  113. {
  114.    
  115.     int nArr[10] = {0, 1, 2,3,4,5,6,7,8,9};
  116.    
  117.     int sum = Palast(&nArr[7]);
  118.    
  119.  
  120.     printf("sum =  %d\n",sum);  
  121. }
  122.  
  123.  
  124.  
  125. */
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144. /*
  145.  
  146. #include<stdio.h>
  147.  
  148.  
  149. ////////////////////////////////////////////////////////////
  150. void foo(char *p)                                         //
  151. {
  152.  
  153.   //  p = p - 7;
  154.      
  155.     printf("%s\n", p-5);
  156. }
  157.  
  158.  
  159. /////////////////////////////////////////////////////////////
  160. int main()
  161. {
  162.    
  163.     char nArr[99] = "SONY_Pictures";
  164.    
  165.  
  166.     foo(&nArr[7]);
  167.  
  168.    
  169. }
  170.  
  171. */
  172.  
  173.  
  174.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement