Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main() {
- char str[100];
- FILE *file = fopen("/home/ananda/Downloads/pratica12/GAAL.txt", "r");
- if(file == NULL){
- printf("arquivo inexistenten");
- return 0;
- }
- FILE *file1 = fopen("/home/ananda/Downloads/pratica12/GAAL2.txt", "w");
- if(file == NULL){
- printf("arquivo inexistenten");
- return 0;
- while (fgets (str, 100, file) != NULL){
- fputs(str, file1);
- return 0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement