Answered step by step
Verified Expert Solution
Question
1 Approved Answer
3. String Search Input one line of sentence, and a string. Then: a) Write a function to extract all words from that sentence into a
3. String Search Input one line of sentence, and a string. Then: a) Write a function to extract all words from that sentence into a global 2-dimensional char arrays and their start position in the sentence. Call this function in your main function and then print the results. b) Write another function to decide whether a word contains a certain string in a case- insensitive manner. Call this function in your main function for all the words. Then output all words that does contain the string, together with their start and end position at the original sentence. c) Make use of the functions you write in your main function. Example & Output Format Requirements i Are you high? Remember. you sweared to live a HEALTHIER life our string to be searched ords found i Are you high Remember ou sweared to live a HEALTHIER life Search result: igh 12 15 EALTHIER 50 58 Press any key to continue Assumptions i. Punctuations only include: "IR" ii. No redundant space at the beginning and the end of the sentence. ii. Words are separated by either one single space or one punctuationone single space. iv. The number of words is no more than 1000, and the length of each word is no more than 1 Other Requirements .Do not include any header files other than
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