Advertisement
dllbridge

Untitled

Oct 23rd, 2023
662
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.09 KB | None | 0 0
  1.  
  2.  
  3. #include   <stdio.h>
  4.  
  5.  
  6. ////////////////////////////////////////////////////
  7. void foo(int *n)
  8. {
  9.  
  10.      ++(*n);
  11. }
  12.  
  13.  
  14.  
  15.  
  16.  
  17. ////////////////////////////////////////////////////   unsigned
  18. int main()                                        //
  19. {
  20.  
  21.     int n = 100;
  22.    
  23.     foo(&n);                                       //
  24.  
  25.     printf("%d\n", n);
  26. }
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39. /*
  40. #include   <stdio.h>
  41.  
  42.  
  43. ////////////////////////////////////////////////////
  44. int foo(int n)
  45. {
  46.    
  47.  
  48.      n ++;
  49.  
  50.  
  51. return n;  
  52. }
  53.  
  54.  
  55.  
  56.  
  57.  
  58. ////////////////////////////////////////////////////   unsigned
  59. int main()                                        //
  60. {
  61.  
  62.     int n = 100;
  63.    
  64.  
  65.    
  66.     n = foo(n);                                              //
  67.  
  68.     printf("%d\n", n);
  69. }
  70.  
  71.  
  72.  
  73. */
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82. //   printf("from foo %d\n", &n);
  83.  //   printf("from main %d\n", &n);
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100. /*
  101. #include   <stdio.h>
  102.  
  103.  
  104.  
  105. char sz[22] = "Pictures";
  106.  
  107. int n = 1;
  108.  
  109. ////////////////////////////////////////////////////   unsigned
  110. int main()                                        //
  111. {
  112.  
  113.                                                   //
  114.  
  115.     printf("SONY\n");
  116.     printf("%s\n", "SONY");
  117.     printf("%d\n",      9);
  118.     printf("%s\n",     sz);
  119.     printf("%d\n",      n);
  120.     printf("%d\n",     &n);    
  121.     printf("%d, %d\n", n,  &n);    
  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.  
  147.  
  148.  
  149.  
  150. /*
  151.  
  152. #include   <stdio.h>
  153.  
  154.  
  155.  
  156. int foo();
  157.  
  158.  
  159. int n = 1111;  
  160.  
  161.  
  162. ////////////////////////////////////////////////////   unsigned
  163. int main()                                        //
  164. {
  165.  
  166.     int n = 4768768;                              //
  167.  
  168.     printf("foo() = %d", foo() );
  169.  
  170. }
  171.  
  172.  
  173.  
  174.  
  175. /////////////////////////////////////////////////////
  176. int foo()
  177. {
  178.    
  179. return 22; 
  180. }
  181.  
  182.  
  183.  
  184.  
  185. */
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196. /*
  197.  
  198. #include   <stdio.h>
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205. int n = 1111;  
  206.  
  207.  
  208. ////////////////////////////////////////////////////   unsigned
  209. int main()                                        //
  210. {
  211.  
  212.     int n = 4768768;                              //
  213.  
  214.     printf("n = %d", ::n);
  215.  
  216. }
  217.  
  218. */
  219.  
  220.  
  221.  
  222.  
  223.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement