Question: Using the language, write a program called hwi.c and compile it to generate hwi.o. gcc hw1.c - hwl.o The program should be invoked like this:

Using the language, write a program called hwi.c and compile it to generate hwi.o. gcc hw1.c - hwl.o The program should be invoked like this: ./hwi.o -i input file - output file ./hw1.o - output file - inputfile That is, the-iswitch can appear before the situations) switch or after you should be able to handle both where o input file: path to a text file that contains several sentences (1 sentence per line). For example, the content of input file can be: Ububtu virtual machine Do not forget that arrays begin at zero Remove the null terninator Flve incredible postseason conebacks You can assume that: a) Each line is less than or equal to 511 characters long (512 with the trailing null "10). b) All lines end with a trailing newline 'In output file: path to a file that does not exist. Your program should create this file and populate it with the sentences from input file but with words shown in reverse order. Taking the above as an example, a correct output file should contain the following: machine virtual Ubuntu zero at begin arrays that forget not to terninator null the Remove comebacks postseason incredible Five . If the program is invoked with the wrong number of arguments, you should print to stderr the following and exit: usage: progi.o -i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
