/* copy one file into another - franjo stipanovic, fritz */ #include int main() { FILE *fin, *fout; int ch; fin = fopen("src.txt", "r"); fout = fopen("dest.txt", "w"); if (fin == NULL || fout == NULL) return 1; while ((ch = fgetc(fin)) != EOF) fputc(ch, fout); fclose(fin); fclose(fout); return 0; }