Question: isMember Function Write a recursive Boolean function named isMember. The function should accept three arguments : an integer array, the number of elements in the

isMember Function

Write a recursive Boolean function named isMember. The function should accept three arguments : an integer array, the number of elements in the array, and a value to search for within the array. The function should return true if the value is found in the array, false otherwise. Demonstrate the function in a driver program. Do not use global variables.

Hints :

The function does not interact with the console directly, so it shouldn't have cin or cout statements.

It returns true or false, so it must have a return statement.

It has exactly 3 parameters.

If you understand recursion, this will be a really easy assignment : the function body should only require a single if/else structure.

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!