Advertisement
Guest User

4

a guest
Apr 24th, 2019
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #define MAXLIN 80
  4.  
  5. int main (void) {
  6. FILE *du, *di;
  7. char linija[MAXLIN];
  8.  
  9. du = fopen ("stara.txt", "r");
  10. di = fopen ("nova", "w");
  11.  
  12. while ( fgets(linija, MAXLIN, du) != NULL ) {
  13. fputs(linija, di);
  14. }
  15.  
  16. fclose(du);
  17. fclose(di);
  18.  
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement