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
Explain the use of function toupper() with and example code?
main() { int ptr[] = {1,2,23,6,5,6}; printf("%d",&ptr[3]-&ptr[0]); }
How can I find out the size of a file, prior to reading it in?
For what purpose null pointer used?
Why do we use & in c?
How can I sort more data than will fit in memory?
What is integer constants?
What does *p++ do? What does it point to?
Can you think of a way when a program crashed before reaching main? If yes how?
#define FALSE -1 #define TRUE 1 #define NULL 0 main() { if(NULL) puts("NULL"); else if(FALSE) puts("TRUE"); else puts("FALSE"); }
Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?
Write a program to reverse a given number in c language?