#include main() { FILE *file1, *file2; int ch; char buf[81]; if ((file1 = fopen("datain.txt", "r")) == NULL) exit(1); if ((file2 = fopen("dataout.txt", "w")) == NULL) exit(2); while (fgets(buf, 81, file1) != NULL) { fputs(buf, file2); } fclose(file1); fclose(file2); }