Question: Lab 21 Due Date: See Blackboard Source File: /2336/21/1ab21.cpp Input: Output: Value: under control of main function under control of main function Write a recursive



Lab 21 Due Date: See Blackboard Source File: /2336/21/1ab21.cpp Input: Output: Value: under control of main function under control of main function Write a recursive function template whose prototype is given by : template typename T> const T *lnearSearch(const T *array, int n, tenToFind); The function performs a linear search of the range [array, arrayn) for itemToFind. The function returns the smallest address i in the range [array, array + n) such that iitemToFind. The function returns nullptr if no such address exists. A main function for testing your function is shown in Figure 1 The expected output from executing this code is shown in Figure 2. To use the Makefile as distributed in class, add a target of lab21main to targets1srcfile #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
