Question: write program in C the given text file named assign 2 has the text of the paragraph below ... Under the previous Commandant, I had

write program in C
the given text file named assign 2 has the text of the paragraph below ...
"Under the previous Commandant, I had free access the a cash box specially set aside for this purpose. There was a sthere room here the which all possible replacement parts were kept."
 write program in C the given text file named assign 2

Given a file, "assgn2_input.txt", uploaded into the assignment folder, create a program with the following functionality. You may use the program in p. 20 of the textbook as a starting template. Use BUFSIZE=100 to iteratively read/write bytes from the input file. (Use while loop as in the example program.) While reading bytes, you should o Find the number of occurrences of "the" word in the file. (Case sensitive) Print out the total number of occurrences of the. While writing bytes back to the file, you should o Replace any occurrence of "the" word with "THE word. o Then, write back the modified contents to the "assgn2_input.txt" file. Print out the contents of assgn2_input.txt file at the end of your program

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!