Question: Write a recursive C function which receives an array of 10 integer elements and a key value. The function should search for the key
Write a recursive C function which receives an array of 10 integer elements and a key value. The function should search for the key and return its index if found, otherwise it should return -1. Use linear search. In main do the following: 1. Fill in the array from user. 2. Read in a key from user. 3. Pass the array and the key to the function. 4. Print "found" and the index value if found, otherwise print "not found".
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
