Question: Please help me get the correct answer and code in Linux and make sure it runs correctly thank you input1.txt It was many and many

with those of other students. (3) You are allowed to use only the system calls covered in the class (e.g. read 0 , write 0 , open0, Iseek (, close () ). You can't use library calls such as fread 0 , fopen 0 , fwrite 0 , ete. If you don't follow this requirement, you will get significant penalty!! (4) Do not change other parts of your program except for the parts beginning with four slashes - there are multiple parts. Assignment Description: Given the template code, "copyReverse.c", fill up the marked portion so that your program is performing the following tasks: - Read from input file whose name is pointed by argv/1]. - Write its reversed file contents into another file whose name is pointed by argv/2/. - You need to use the given buffer size of 100. If you change this, there will be significant point reduction. - Exception handling is important. If your program doesn't handle exceptions of system call failure - e.g., open 0 , read ), write (, Iseek (0 - then you will get some penalty. - You should not change the given template code except for the part designated to be filled up by you. The following is for your own programming and debugging purposes. The only file you need to submit to codePost.io is "copyReverse.c" In Ubuntu, you can compile this program as was discussed in the class: $> gce 0 copyReverse copyReverse.c After the compilation you need to run your program with two file names as commandline arguments such as: $>./ copyReverse file1.txt file2.txt Then your program is supposed to create another file "file2.txt" from the existing file "file 1.txt" after reversing the enntents codePost.io is "copyReverse.c" In Ubuntu, you can compile this program as was discussed in the class: $> gcc 0 copyReverse copyReverse.c After the compilation you need to run your program with two file names as commandline arguments such as: $>./ copyReverse file1.txt file2.txt Then your program is supposed to create another file "file2.txt" from the existing file "file1.txt" after reversing the contents completely. For example, if your input file, file1.txt, contains: GAILY bedight, ABC A gallant knight, GAILY bedight, ABC A gallant knight. GAILY bedight, ABC A gallant knight. GAILY bedight, ABC A gallant knight, GAILY bedight, ABC A gallant knight, GAlLY bedight, ABC A gallant knight, Then, the output file, file2.txt, should contain: ,thgink tnallag ACBA , thgideb YLIAG , thgink tnallag ACBA , thgideb YLIAG , thgink tnallag A CBA , thgideb YLIAG ,thgink tnallag ACBA , thgideb YLIAG ,thgink tnallag ACBA , thgideb YLIAG , thgink tnallag ACBA , thgideb YLIAG
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
