Question: The program filter should process argv and argc parameters to main()and perform simple operation on a sequence of arguments. The default behavior is to print
The program filter should process argv and argc parameters to main()and perform simple operation on a sequence of arguments.
-
The default behavior is to print out a sorted list of arguments, with any duplicates removed.
-
Interspersed in the list may be options that modify the behavior of the program to provide
alternative output. If present, these options arent part of the list that is processed. Valid options are:
-h print out high value
-l print out low value
The Makefile should have multiple targets
-
help: this target should print out the names of all the other targets using the Unix command
echo
-
compile: this target should execute commands to compile the program
-
test: this target should execute the program with interesting test cases (at least 2)
-
clean: this target should delete the compiled program and any .o files created
-
all: for this assignment, this target should utilize your compile and test targets as prerequisites
-

-/Documents/0S> ./filter apple zebra orange apple orange zebra - /Documents/0S> ./filter apple zebra -l orange low: apple |- /Documents/05> ./filter - h apple zebra -1 orange low: apple high: zebra |-/Documents/05> ./filter -high apple zebra -l orange Low: -high |- /Documents/0S> ./filter -h ERROR: invalid arguments Usage: filter [-l] [-h] string string ... |-/Documents/05>
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
