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
WRITE A C PROGRAM TO FIND SECOND BIGGEST VALUE FROM THE GIVEN VALUES
ATM machine and railway reservation class/object diagram
What is difference between main and void main?
f(char *p) { p=(char *)malloc(sizeof(6)); strcpy(p,"HELLO"); } main() { char *p="BYE"; f(p) printf("%s",p); } what is the output?
9 Answers Hughes, Tech Mahindra,
WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER
c program to manipulate x=1+3+5+...+n using recursion
class foo { public: static int func(const char*& p) const; }; This is illegal, why?
what will be maximum number of comparisons when number of elements are given?
Write a code to determine the total number of stops an elevator would take to serve N number of people.
How does normalization of huge pointer works?
What is logical error?
how to write a prog in c to convert decimal number into binary by using recursen function,