1. Write a program that concatenates two fi les whose names are input as command-line arguments. 2. Write a program that reads fi les foo1 and foo2 and writes foo3 with a line of foo1 followed by a...


1. Write a program that concatenates two fi les whose names are input as command-line arguments.


2. Write a program that reads fi les foo1 and foo2 and writes foo3 with a line of foo1 followed by a line of foo2 and so on. The sequence is terminated when EOF is encountered in one of the fi les. The program must display the contents of foo3.


3. Assuming that a text fi le contains characters in the ASCII range 0 to 127 and contains at least one newline character, create a function that uses the filename as argument to return 1 if the fi le contains only text, or -1 otherwise.



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here