Advertisement
fiandi

FILE ALPRO BONUS 1

May 23rd, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6.     FILE *bukafile;
  7.     char f[50],ff[50];
  8.  
  9.     bukafile=fopen("F1.txt", "r");
  10.     fscanf(bukafile,"%s", &f);
  11.     fclose(bukafile);
  12.  
  13.     bukafile=fopen("F2.txt", "r");
  14.     fscanf(bukafile,"%s", &ff);
  15.     fclose(bukafile);
  16.  
  17.     bukafile=fopen("F3.txt", "w");
  18.     fprintf(bukafile, "%s %s",f,ff);
  19.     fclose(bukafile);
  20.  
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement