Question: Write a C program to copy files using getchar() and putchar() functions, and test botht he standard input as well as file data copying. If

Write a C program to copy files using getchar() and putchar() functions, and test botht he standard input as well as file data copying.

If the text is typed on the user prompt as standard input then the should be text copied to the standard output. If the text is provided as a file input then the program copies the file content to the standard output.

Also redirect standard output to a file. For input from an input file, use redirection as "program >" and output goes to standard output. For input from an input file and output to an output file, use redirections as "program < inputfile > outputfile".

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!