Advertisement
dllbridge

Untitled

Jun 5th, 2023
964
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.98 KB | None | 0 0
  1.  
  2.  
  3. #include   <stdio.h>
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10. int foo(int*);
  11.  
  12. ///////////////////////////////////////////////////
  13. int main()                                       //  
  14. {
  15.    
  16.     int arr[77];           //= { 0, 1, 2};
  17.    
  18.     for(int i = 0; i < 20; i++)
  19.     {          
  20.       arr[i] = i;  
  21.    
  22.     }  
  23.    
  24.     foo(arr);
  25.  
  26.  
  27. return 0;
  28. }
  29.  
  30.  
  31.  
  32.  
  33. ///////////////////////////////////////////////////
  34. int foo(int *p)
  35. {
  36.    
  37.    
  38.     for(int i = 0; i < 20; i++)
  39.     {          
  40.       printf(" %2d\n", p[i]);  
  41.    
  42.     }  
  43. }
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50. /*
  51. #include   <stdio.h>
  52. #include  <locale.h>       //  здесь "живёт" setlocale(LC_ALL, "rus");
  53.  
  54.  
  55. int foo();
  56.  
  57. ///////////////////////////////////////////////////
  58. int main()                                       //  
  59. {
  60.    
  61.     setlocale(LC_ALL, "rus");
  62.    
  63.     int n = foo();
  64.                
  65.     printf("Верные символы %d != %d", 77, n);  
  66.  
  67. return 0;
  68. }
  69.  
  70.  
  71.  
  72. ///////////////////////////////////////////////////
  73. int foo()
  74. {
  75.    
  76. return 99; 
  77. }
  78.  
  79. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement