Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 . .Follow global variable naming convention

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

b. What are its goals and objectives?

Answered: 1 week ago

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago