Question: System Prog! C program only ! Please, read the question carefully. if you do not know or understand this question, do not post anything. Assgn2_input.txt.

System Prog!

C program only! Please, read the question carefully. if you do not know or understand this question, do not post anything.

Assgn2_input.txt. <== given input file. I posted the content at the end of the question.

Given a file, assgn2_input.txt, uploaded into the assignment folder, create a C program with the following functionality.

  • 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
    • 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
    • Replace any occurrence of the word with THE word.
    • 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.

Submit the following in MS Word file:

  1. Your complete code in text format.
  2. Screenshots showing successful compilation
  3. Screenshots showing running of your program.

I posted the input text file below.

Assgn2_input.txt

Its a peculiar appartheus, said the Officer the the Traveller, gaztheg with a certathe admirtheithe the the device, with which he was, of course, thoroughly familiar. It appeared ththe the Traveller had resptheded the the thevittheithe of the Commandant thely out of politeness, when he had been asked the thetend the executithe of a soldier cthedemned for disobeytheg and thesulttheg his superior. Of course, theterest the the executithe was not very high even the the penal colthey itself. At least, here the the small, deep, sandy valley, closed the the all sides by barren slopes, apart from the Officer and the Traveller there were present thely the Cthedemned, a vacant-looktheg man with a broad mouth and dilapidtheed hair and face, and the Soldier, who held the heavy chathe the which were cthenected the small chathes which bound the Cthedemned Man by his feet and wrist bthees, as well as by his neck, and which were also ltheked the each other by cthenecttheg chathes. The Cthedemned Man, thecidentally, had an expressithe of such dog-like resigntheithe ththe it looked as if thee could set him free the roam around the slopes and would thely have the whistle the the start of the executithe for him the return. The Traveller had little theterest the the appartheus and walked back and forth behthed the Cthedemned Man, almost visibly thedifferent, while the Officer theok care of the ftheal prepartheithes. Sometimes he crawled under the appartheus, which was built deep thethe the earth, and sometimes he climbed up a ladder the thespect the upper parts. These were really jobs which could have been left the a mechanic, but the Officer carried them out with grethe enthusiasm, maybe because he was particularly fthed of this appartheus or maybe because there was some other reasthe why thee could not trust the work the anythee else. Its all ready now! he ftheally cried and climbed back down the ladder. He was unusually tired, brethehtheg with his mouth wide open, and he had pushed two fthee ladys handkerchiefs under the collar of his uniform. 

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!