Question: Write the definition of a recursive function named find that is passed a c- string and a char and returns with the post of the
Write the definition of a recursive function named find that is passed a c- string and a char and returns with the post of the char if it finds the char within the c-string or returns 1 if the char is not found. You must implement the expected function, but you may write other code as long as any additional code you provide helps make find perform as expected. For example, . If a c-string named cost containing the value "this is my string" and a char named c containing the value 'i'0 is passed in to find, the function should return the value 2. However, if c contained the value ' a', then and would return -1. This is what the function call for the example above would look like: found At - find(c)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
