Advertisement
dllbridge

Untitled

Mar 2nd, 2024
776
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.44 KB | None | 0 0
  1.  
  2.  
  3. #include   <stdio.h>
  4.  
  5.  
  6. char sz[99];
  7.  
  8.  
  9. ////////////////////////////////////////////////////////
  10. int main()
  11. {
  12.    
  13.     for(int i = 0; i < 5; i++)
  14.     {
  15.        
  16.         sz[i] = 104 + i;   
  17.     }
  18.  
  19.     printf(sz);  
  20.    
  21.          
  22. return 0;
  23. }
  24.                          
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40. /*
  41.  
  42.  
  43. #include   <stdio.h>
  44.  
  45.  
  46. char sz[99] = "SONY";
  47.  
  48.  
  49. ////////////////////////////////////////////////////////
  50. int main()
  51. {
  52.    
  53.     sz[2] = 'Z';
  54.  
  55.     printf("sz[0] = %c \n", sz[0]);      
  56.     printf("sz[1] = %c \n", sz[1]);  
  57.     printf("sz[2] = %c \n", sz[2]);      
  58.     printf("sz[3] = %c \n", sz[3]);
  59.     sz[1] = 'b';
  60.     printf(sz);      
  61. return 0;
  62. }
  63.                          
  64.  
  65. */
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79. /*
  80.  
  81. #include   <stdio.h>
  82.  
  83.  
  84. int n1 = 43,  //  l;k dgkl;  ;kfdlk dgfl;k  
  85.     n2 = 44;  //  lkjkljsdlk klsj fkl jaskldf
  86.    
  87. char c = '$';  
  88.  
  89. char sz[99] = "SONY";
  90.  
  91.  
  92. ////////////////////////////////////////////////////////
  93. int main()
  94. {
  95.    
  96.    
  97.                
  98.     printf("size of c = %d\n", sizeof(c));  
  99.     printf("        c = %c\n",        c );  
  100.     printf("       sz = %s\n",        sz);  
  101.    
  102. return 0;
  103. }
  104.  
  105. */
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121. /*
  122. #include   <stdio.h>
  123. #include  <locale.h>       //  здесь "живёт" setlocale(LC_ALL, "rus");
  124.  
  125. int n1 = 43,
  126.     n2 = 44;
  127.  
  128.  
  129. ////////////////////////////////////////////////////////
  130. int main()
  131. {
  132.    
  133.    
  134.                
  135.     printf("n = %d\n", n1 - n2);    
  136.  
  137.  
  138.    
  139. return 0;
  140. }
  141.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement