Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. char str[100];
  5. FILE *file = fopen("/home/ananda/Downloads/pratica12/GAAL.txt", "r");
  6. if(file == NULL){
  7. printf("arquivo inexistenten");
  8. return 0;
  9. }
  10.  
  11. FILE *file1 = fopen("/home/ananda/Downloads/pratica12/GAAL2.txt", "w");
  12. if(file == NULL){
  13. printf("arquivo inexistenten");
  14. return 0;
  15.  
  16.  
  17. while (fgets (str, 100, file) != NULL){
  18. fputs(str, file1);
  19. return 0;
  20. }
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement