Question: I need a C code for the following.. So if we have an input string, I want a C code that counts the number of
I need a C code for the following..
So if we have an input string, I want a C code that counts the number of occurances of a specific word. For example, if my input string is "I like pizza and I like pie" and I want to count the number of ocurances of the word like, my output should be..
like---2
The code should work for any input string and it should count anyword that I want to count. The string should not be hardcoded it should be any string that the user wants to write. The word that we want to count should also not be hardcoded it should be any word the user wants to input.
---Please Provide Full Code in C as well as Output--
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
