Write a program to find the number of times that a given word(i.e. a short string) occurs in a sentence (i.e. a long string!).
Read data from 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.
No Answer is Posted For this Question
Be the First to Post Answer
How can I remove the trailing spaces from a string?
Hierarchy decides which operator a) is most important b) is used first c) is fastest d) operates on largest numbers
declare afunction pointer to int printf(char *)?
WRITE A PROGRAM IN C TO MULTIPLY TWO 2-D ARRAYS
What are the two forms of #include directive?
What does the error 'Null Pointer Assignment' mean and what causes this error?
What are header files and what are its uses in C programming?
i want to know the procedure of qualcomm for getting a job through offcampus
Explain how can you tell whether two strings are the same?
Can you assign a different address to an array tag?
Write a Program to accept different goods with the number, price and date of purchase and display them
What are the advantages of using new operator as compared to the function malloc ()?