Advertisement
paulogp

Copiar ficheiro (v. 1.0.0)

Jul 13th, 2011
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.21 KB | None | 0 0
  1. // Apple Xcode
  2.  
  3.  
  4. int c;
  5.  
  6. FILE *fp1 = fopen(“original”, ”r”);
  7. FILE *fp2 = fopen(“clone”, ”w”);
  8.  
  9. while(1)
  10. {
  11.     c = fgetc(fp1);
  12.     if(c==EOF) break;
  13.     fputc(c, fp2);
  14. }
  15.  
  16. fclose(fp1);
  17. fclose(fp2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement