Question: Write a C program that counts the number of non white-space characters in an input text file. Program takes as command argument(s) the name of
- Write a C program that counts the number of non white-space characters in an input text file. Program takes as command argument(s) the name of the input file (and the output file with option -f). Based on the option flags, it displays the output on the standard output, or writes the output to an output file. (25 points)
The command format is as follows:
command -f inputfile outputfile or,
command -s inputfile
-f indicates writing to an output file;
-s indicates displaying the output on the screen.
Also notice the errors caused by incomplete arguments.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
