Question: What is wrong with the following function? What is wrong with the following function? The function tries to change the contents of the array, but

What is wrong with the following function?
What is wrong with the following function?
The function tries to change the contents of the array, but can't because the array is declared asconst
The function should be using a variable called count instead ofpos
The function should be returning the position number of where the item is found, rather than returningtrue
The array parameter should not have the wordconst in front of it
Ifkey is not present in the array, the function keeps searching past the end of the array
We can't use == to compare integers, and so thekey item will never be found

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 Programming Questions!