Using system I/O functions to write a C program to combine multiple text f iles into a single file and display the content of the combined file

Question

Using system I/O functions to write a C program to combine multiple text f iles into a single file and display the content of the combined file. (Note you could still use the “printf(…)” function to display information to terminal.) Assume we call this program “append”, the way to use it is as follows: shell prompt >./append file1 file2 file3 combinedfile In the above, file1 to file3 are existing text files, and combinedfile is a newly created file whose contents is the concatenation of file1 followed by f ile2 followed by files3.

Your program should display the content of the combinedfile in terminal window before it terminates. Your program should work on any number of input files. The example usage given above shows 3 input files (file1, file2, and file3), and your program should also work, for example, say, 30 inputs files (file1, …, file30) as well.

0

Leave an answer