#include int main() { FILE *infile, *outfile, *printer; char infilename[25], outfilename[25]; int c; printf("Enter input file name ----> "); scanf("%s", infilename); infile = fopen(infilename, "r"); printf("Enter output file name ---> "); scanf("%s", outfilename); outfile = fopen(outfilename, "w"); printer = fopen("PRN", "w"); do { c = getc(infile); if (c != EOF) { putchar(c); putc(c, outfile); putc(c, printer); } } while (c != EOF); fclose(printer); fclose(infile); fclose(outfile); return 0; } /* Result of execution (This program writes to the printer, a file, and the monitor.) */