Advertisement
dllbridge

Untitled

Feb 12th, 2025
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.96 KB | None | 0 0
  1.  
  2.  
  3. #define _CRT_SECURE_NO_WARNINGS
  4.  
  5.  
  6. #include  <stdio.h>
  7. #include <string.h>
  8. #include <locale.h>
  9.  
  10. FILE* q;
  11.  
  12. //////////////////////////////////////////////////////////////
  13. int main()                                                  //
  14. {
  15.    
  16.     char sz[99];
  17.    
  18.     char c;
  19.     int  i = 0;
  20.    
  21.     setlocale(LC_ALL, "rus");
  22.    
  23.     q = fopen("nd.txt", "r");
  24.    
  25.     fscanf(q, "%s", sz);
  26.    
  27.     printf("%s\n", sz);
  28.    
  29.     while(i++ < 30)
  30.     {  
  31.        
  32.        fscanf(q, "%c", &c);
  33.        printf( "%c",  c);      
  34.     }
  35.    
  36.    
  37.     fclose(q);
  38. }
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52. /*
  53. #define _CRT_SECURE_NO_WARNINGS
  54.  
  55.  
  56. #include  <stdio.h>
  57. #include <string.h>
  58. #include <locale.h>
  59.  
  60. FILE* q;
  61.  
  62. //////////////////////////////////////////////////////////////
  63. int main()                                                  //
  64. {
  65.    
  66.     setlocale(LC_ALL, "rus");
  67.    
  68.     q = fopen("nd.txt", "a");
  69.    
  70.     fprintf(q,     "SONY\n");
  71.     fclose(q);
  72. }
  73.  
  74.  
  75. */
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement