Advertisement
dllbridge

Untitled

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