Advertisement
Guest User

Untitled

a guest
May 24th, 2017
60
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. #include <ctype.h>
  4.  
  5. int main()
  6. {
  7.     FILE *f_unos,*f_ispis;
  8.     char c;
  9.  
  10.     f_unos = fopen("unos.txt","r");
  11.     f_ispis = fopen("ispis.txt","w");
  12.  
  13.     if (f_unos==NULL || f_ispis==NULL) printf("Nisu otvoreni fajlovi");
  14.  
  15.     while(c=getc(f_unos)!=EOF) {
  16.         putc(c,f_ispis);
  17.     }
  18.  
  19.     fclose(f_unos);
  20.     fclose(f_ispis);
  21.  
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement