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
Process by which one bit pattern in to another by bit wise operation is?
if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0
What is the purpose of sprintf() function?
Why main function is special give two reasons?
Can a file other than a .h file be included with #include?
sqrt(x+sqrt(x+sqrt(x+sqrt(x))))=2; Find the value of x?
how many argument we can pas in in a function
Explain what is the concatenation operator?
What is a header file?
Are c and c++ the same?
difference between malloc and calloc
What is the maximum no. of arguments that can be given in a command line in C.?