Question: Please write the following program in C. Function find_substr() takes two string arrays (a, b) as parameters, uses function str_length() to determine the lengths of

Function find_substr() takes two string arrays (a, b) as parameters, uses function str_length() to determine the lengths of the strings, and then looks for the smaller string anywhere in the bigger string. It returns 1 if the substring is found, or returns -1 if no match is found. Write the two functions. Take two strings as input in the main method and use find_substr() to check if the second string is a substring of the first one. (Restriction: str_length() cannot uses built-in strlen() function) Sample input Sample output madam adam adam is a substring of madam telescope less less is not a substring of telescope 101010 101 101 is a substring of 101010
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
