Question: C language Write a program to find the word that have a specific character among the words of a string. Read a string and a
Write a program to find the word that have a specific character among the words of a string. Read a string and a character from the user and display all the words having that character on the screen. One way to do this is to find the words in one sentence and check if they have the required character in them. Another way is to find all the occurrences of the character and then find the words in those locations. Assume that words are not case sensitive in your program. Both the words "One" and "one" have an 'o' in them. Do not string function strtok(). You can write your own version of strtok() and use then in your program if you want. Sample execution is given below Enter a sentence This is my first sentence Enter a character i words containing i are: This is first Since words are case sensitive we have the following sample execution Enter a sentence I am a computer scientist Enter a character i words containing i are
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
