Question: How can i solve this C Programming question? Assignment 4.8: Counting words Write a program that counts how often a word occurs in the program
How can i solve this C Programming question?
Assignment 4.8: Counting words Write a program that counts how often a word occurs in the program input. The word that needs to be counted will be passed as a program argument ($6.14 from [1]). When no argument has been passed, the following error must be reported (end line with a newline): No argument given The text in which the word is counted shall be read from standard input. It may be assumed that the lines in the input do not exceed 1022 characters. The string "#EOF" on the beginning of a line indicates the end of the input. It it not necessary to consider word boundaries, and overlapping words must be counted as well: with an input of baaaab, the word aa shall be counted three times. Also, the program must be case sensitive (let + Let). Program arguments can be passed in Code::Blocks using Project + Set programs' argu- ments.... Input The lines of text, terminated by #E0F. For example: Let it be, let it be, let it be, let it be. Whisper words of wisdom, let it be. #EOF CHAPTER 4. ARRAYS, POINTERS AND STRINGS 29 Output With the program argument let the output is. End with a newline. For example:: 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
