Question: in C program, use only #include and no alternate libraries.... (20 points) Write a program that contains a function called findString() that determines if one

in C program, use only #include and no alternate libraries....

in C program, use only #include and no alternate libraries.... (20 points)

(20 points) Write a program that contains a function called findString() that determines if one character string exists inside another string. The first argument to the function should be the character string that is to be searched and the second argument is the string you are interested in finding. If the function finds the specified string, have it return the location in the source string where the string was found. If the function does not find the string, have it return -1. So, for example, the call index - findString ("a chatterbox", "hat"); searches the string "a chatterbox" for the string "hat". Because "hat" does exist inside the source string, the function returns 3 to indicate the starting position inside the source string where "hat" was found The program should prompt the user for two strings, one that is to be searched, and another is a string to be found. The program should then print out the location in the string to be searched where the second string is found. If no string is found, an appropriate message should be displayed. Use the readLine function presented in class to get strings from the user

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!