Question: c++ must be recursive Question 6 (15 points) Index i in an array arr is called a fixed-point, if arr[i] == i (the value in
Question 6 (15 points) Index i in an array arr is called a fixed-point, if arr[i] == i (the value in arr[i] is i). For example, the array arr = [3, 1, 4, 7, 4] has 2 fixed points indices 1 and 4). Give a recursive implementation for: int findNumberOfFixedPoints(int arr[], int arrSize) The function is given arr, an array containing integers, and its logical size, arrSize. When called, it should return the number of fixed-points in arr. For example, if arr = (3, 1, 4, 7, 4), The call findNumberOfFixedPoints(arr, 5) should return 2. Notes: 1. You don't need to write a main() program. 2. Your function must be recursive
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
