Write a function template for a function that has parameters for a partially
filled array and for a value of the base type of the array. If the value is in
the partially filled array, then the function returns the index of the first
indexed variable that contains the value. If the value is not in the array,
the function returns − 1. The base type of the array is a type parameter.
Notice that you need two parameters to give the partially filled array: one
for the array and one for the number of indexed variables used. Also,
write a suitable test program to test this function template.
Sorry the answer is not available at the moment…
If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.
Spread the 'tradition of sharing'.