I’m working on a c programming question and need support to help me learn.
In this assignment, you are asked to complete a program that gets a file name (and path)as its only command-line argument and shuffles the file content randomly using low-levelI/O functions open, read, write, and lseek. Here is the incomplete program: (See Attached Image. I could not copy paste the code, so I have to screenshot, sorry.)
As you see, the program first opens a file, say io.txt, using O RDWR mode since itssupposed to both read the file and write into it. Then, using lseek, it finds the number ofbytes/characters stored in the file. If we assume that originally, the file io.txt contains thesequence of characters a1, a2, . . . , an, your task is to complete the implementation of mainfunction so that the program manipulates the file in a way that after termination of theprogram, the file contains the same same sequences of characters, but with a random permu tation: a?1, a?2, . . . , a?n where ?1, ?2, . . . , ?n is a random permutation of numbers 1, 2, . . . , n.For example, if the file content is originally eat, after running the program, the file contentmust be one of the following six words:eat, eta, ate, aet, tea, taeOf course, a correct implementation will output each word with an equal chance of 1/6.Also, a correct implementation should not assume any upper-bound for the file size.As the only deliverable of this assignment, you need to submit a .c file.
"Place your order now for a similar assignment and have exceptional work written by our team of experts, guaranteeing you A results."