Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Post New Answer

More C Interview Questions

WRITE A C PROGRAM TO FIND SECOND BIGGEST VALUE FROM THE GIVEN VALUES

1 Answers  


ATM machine and railway reservation class/object diagram

0 Answers   Zycus Infotech,


What is difference between main and void main?

0 Answers  


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

0 Answers  


c program to manipulate x=1+3+5+...+n using recursion

2 Answers   Wipro,


class foo { public: static int func(const char*& p) const; }; This is illegal, why?

8 Answers   Google,


what will be maximum number of comparisons when number of elements are given?

0 Answers  


Write a code to determine the total number of stops an elevator would take to serve N number of people.

0 Answers   Expedia,


How does normalization of huge pointer works?

0 Answers  


What is logical error?

0 Answers  


how to write a prog in c to convert decimal number into binary by using recursen function,

1 Answers  


Categories