Question: Solve using c++ 2. (Function Template) (15 points) A linear search function header line is given as follows. This function searches for the key in
2. (Function Template) (15 points) A linear search function header line is given as follows. This function searches for the key in an integer array and returns (true/ false) to inform about the existence of the key in the array bool linearSearch(int arr[], int key, int size) Write a function template version of linearsearch, which can be used to search an array of elements of any type. Test it for an int array, a double array, a char array and a string array. Also test it when searching for a value that is not in the array extra credit points will be added if a program is tested and the corresponding screen shot is ubmitted
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
