Question: c++ help with Question 9, Thank you! test code and header for your programs: // test_searches.cpp #include searches.h #include using namespace std; int main(){ int
c++ help with Question 9, Thank you!

test code and header for your programs:
// test_searches.cpp #include "searches.h" #includeusing namespace std; int main(){ int a[7]={1,5,8,12,17,23,39}; int k,n; cout ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
// test_searches.cpp #include "searches.h" #includeusing namespace std; int main(){ int a[7]={1,5,8,12,17,23,39}; int k,n; cout 8. Write a C++ function named linear search that accepts an integer value to ing search for, an array of integers, and the number of integers in the array. Us the linear search algorithm, the function must return the position of the first parameter in the array. If the first parameter is not in the array, the function returns -1 9. Write a C+-+ binary search function with the same parameters as the linear search function described in the previous exercise. Search the list using the binary search algorithm and return the location of the first parameter in the array (returning -1 if the value is not found). The array that is passed to the binary search algorithm must be sorted
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
