Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Word Search (wordSearch.c) Write a program that uses the function specified below to search for a given phrase inside a give or less. n
1. Word Search (wordSearch.c) Write a program that uses the function specified below to search for a given phrase inside a give or less. n string. You may assume that the two strings will always be 100 characters Implement this function int wordSearch (char *sentence, char *phrase); The function takes a sentence and a phrase to search in the sentence. If the sentence contains the phrase, then the function returns 1 The main function will prompt the user to enter a sentence and a phrase to search for Then it will use the wordSearch function to determine if the phrase was found in the sentence or not Sample Output Enter a sentence: My dogs name is spot. Enter a phrase to search The phrase"spot" was found in the sentence: spot Enter a sentence: I have a pet dog Enter a phrase to search in the sentence: cat The phrase "cat" was NOT found
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started