Question: Please programming in C (Submit a single .c file.) Note in the comment block how well you completed the task (eg. Works completely; or x
Please programming in C
(Submit a single .c file.)
Note in the comment block how well you completed the task (eg. Works completely; or x and y work, but z does not).
Use getopt to accept the following optional parameters:
{ head | tail } [OPTION ] . . . [ FILE ]
Print the first | last 10 lines of FILE to standard output .
If no FILE read standard input.
Options :
-n K output the first|last K lines
-V Output version info: Your name, email, student number.
-h display all options ( something like this ) and exit
-e|-o print even|odd lines.
The odd and even line printing maybe a little bazaar and generally useless, but it is there to test your programming. If -n 20, then your program should output 20 lines (eg. half of the first|last 40 lines). Number the first line of the file as 1 when calculating odd and even.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
