Question: Only using and str search Write a function str search that will take 2 strings, pattern and text as parameters and will return the number
Only using
str search Write a function str search that will take 2 strings, pattern and text as parameters and will return the number of occurrences of pattern in text. For example, if pattern is "ana" and text is "ana ate the banana", then the resulting value should be 3. Consider that matching is always case-sensitive. unsigned int str_search (const char *pattern, const char *text)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
