Advertisement
dllbridge

Untitled

Mar 2nd, 2023
689
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.73 KB | None | 0 0
  1.  
  2.  
  3. #include   <stdio.h>
  4.  
  5.  
  6.  
  7. char sz[123];
  8.  
  9.  
  10. ////////////////////////////////////////////////////
  11. int main()                                        //
  12. {
  13.  
  14.     FILE *fp;
  15.  
  16.  
  17.     fp = fopen("sony.txt", "r");
  18.    
  19.     if(fp == 0) { printf("Error file open\n"); return 0; }
  20.    
  21.     fscanf(fp, "%s", sz);
  22.     printf(sz);
  23.    
  24.     if(fp != 0) fclose(fp);
  25. }
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33. /*
  34.  
  35.  
  36.  
  37. ////////////////////////////////////////////////////
  38. int main()                                        //
  39. {
  40.  
  41.     FILE *fp;
  42.  
  43.  
  44.     fp = fopen("sony.txt", "w");
  45.    
  46.     if(fp == 0) { printf("Error file open\n"); return 0; }
  47.    
  48.    
  49.     fprintf(fp, "Hello, World!\n End of file....");
  50.    
  51.     if(fp != 0) fclose(fp);
  52. }
  53.  
  54.  
  55.  
  56. */
  57.  
  58.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement