Question: Refer to the searchAll function defined in the lecture notes, and also seen in the SearchingArrays 2 . cpp file that was distributed as a

Refer to thesearchAll function defined in the lecture notes, and also seen in theSearchingArrays2.cppfile that was distributed as a class demo file.
If you were writing a main program which uses this function to search an array namednums to see if the number 15 was stored in the array, how will you know if the function was NOT able to find any 15's in nums?
Refer to thesearchAll function defined in the lecture notes, and also seen in theSearchingArrays2.cppfile that was distributed as a class demo file.
If you were writing a main program which uses this function to search an array namednums to see if the number 15 was stored in the array, how will you know if the function was NOT able to find any 15's in nums?
The function will return the position number of where 15 was found, or will return -1 if it was not found
TheusedSize parameter will be holding the value 0 after the function ends
Thefound parameter will be holding the value true after the function ends
The foundSizeparameter will be holding the value 0 after the function ends
The function will return the valuetrue
The function will return the valuefalse

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!