Atleast show your code (efforts) & specify where you are stuck up. You are expecting that someone will write the entire code for you. You've not even specified what your specific problem is about.
Write a program to find the number of times that a given word(i.e. a short string) occurs in the sentence(i.e. in a sentence!).
Read data from the standard input. the first line is a single word, which is followed by general text on the second line. read both up to a newline character, and insert a terminating null before processing.
Typical output should be: The word is "the". The sentence is "the cat sat on the mat". The word occurs 2 times.