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
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
Get step-by-step solutions from verified subject matter experts
