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
main() { char ch='356'; Printf("%d",ch); } *OUTPUT*:- -18 *Why?*
Consider a language that does not have arrays but does have stacks as a data type.and PUSH POP..are all defined .Show how a one dimensional array can be implemented by using two stacks.
1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.
Given an array of length N containing integers between 1 and N, determine if it contains any duplicates.
A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none
what is compiler
print the pattern 1 2 4 3 6 9 4 8 12 16 5 10 15 20 25 if n=5
How are variables declared in c?
Why array is used in c?
Write a program to print "hello world" without using a semicolon?
What is external and internal variables What is dynamic memory allocation what is storage classes in C
find largest of 3 no