Question: PLease help me complete this and compile in VM. Some reason the txt fle with the character is not reading while compiling. See the Iseek

PLease help me complete this and compile in VM. Some reason the txt fle with the character is not reading while compiling.

PLease help me complete this and compile in VM. Some reason the

txt fle with the character is not reading while compiling. See the

See the Iseek example.c file provided on Canvas under the code/syscalls files. Modify the Iseek_example.c, such that it reads from an input file (named "start.txt") and will print to an output file (named "end.txt") every (1+3*i)th character, starting from the 1st character in the input file. In other words, it will print the 1st character, then skip 2 characters and print the 4th one, then skip 2 characters and print the 7th one, and so on. For instance, for input file: ABCDEFGHIJKLM It will output: ADGJM You may use cLion inside VM, or any other text editor of your choice, such as vi or emacs. There is also a neat text editor named Kate available in Ubuntu (you can find it in the menu). In cLion you can open a single.c file without having to create a whole new project and modify the single.c file. Find the Iseek_example.c file and open it in the text editor tool you choose to use. In the command line terminal (Shell), you can compile with "gcc -o Iseek_example Iseek_example.c". This is going to create an executable file named "I seek_example". You can run it with "./Iseek_example". Submit the Iseek_example.c file (source code file) that you modified. // C program to read nth byte of a file and 11 copy it to another file using Iseek #include #include #include #include void func(char arr[], int n) { // Open the file for READ only. int f_read = open("start.txt", O_RDONLY); // Open the file for WRITE and READ only. int f_write = open("end.txt", O_WRONLY); int count = 0; while (read(f_read, arr, 1)) { // to write the 1st byte of the input file in // the output file if (count

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!