Question: Write a recursive function containsOnly that takes three parameters: an array, its size, and a target value. The array contains integers, and the target value
Write a recursive function containsOnly that takes three parameters:an array, its size, and a target value. The array contains integers, and the targetvalue is an integer. The function should return true if every value in the array isequal to the target value, otherwise it should return false. Note: your functionshould return true if the size is Do not use loops, extra parameters, or global or static variables
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
