Question: Consider the following array A[] of integers: 0 5 3 1 2 2 8 a. Write a C++ recursive function that prints the contents
Consider the following array A[] of integers: 0 5 3 1 2 2 8 a. Write a C++ recursive function that prints the contents of the array A from location 0 through location 7. Show a sample call for such function 6 b. Write a C++ recursive function that returns the sum of the contents of the array from location 0 through location 7. Show a sample call for such function. C. Write a C++ recursive function that returns the number of non-zero elements in the array from location 0 through location 7. The Show a sample call for such function. d. Write a C++ recursive function to perform a recursive linear search. It searches for an input number x in the input array from location 0 through location 7. The function returns the location of x in the array if found, or -1, otherwise.
Step by Step Solution
3.45 Rating (152 Votes )
There are 3 Steps involved in it
Here are C implementations of the requested recursive functions for the given array include Part a R... View full answer
Get step-by-step solutions from verified subject matter experts
