Question: C++ using command line to take text files names as argument and display contents. The contents of 1.txt are: apple banna orange The contents of
C++ using command line to take text files names as argument and display contents.
The contents of 1.txt are:
apple
banna
orange
The contents of 2.txt are:
987
654
321
Running the program in command line should give the following output:
$ ./program 1.txt 2.txt
apple
banna
orange
987
654
321
example with non-existing file 3.txt
: $ ./program 1.txt 2.txt 3.txt
apple
banna
orange
987
654
321
Invalid file: 3.txt
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
