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
What are integer variable, floating-point variable and character variable?
What is the use of printf() and scanf() functions?
A program to write a number of letters and numbers, such as counting and display
in iso what are the common technological language?
Is there a way to compare two structure variables?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it.
How can you convert integers to binary or hexadecimal?
Explain how do you list a file’s date and time?
how many argument we can pas in in a function
prog for 1st five prime numbers in 2^x - 1
2. What is the function of ceil(X) defined in math.h do? A)It returns the value rounded down to the next lower integer B)it returns the value rounded up to the next higher integer C)the Next Higher Value D)the next lower value
What is sizeof array in c?