Question: Write the following program in C++ Question 1 15 pts Write a templated function named getIdx that searches an array of elements for a specific
Write the following program in C++

Question 1 15 pts Write a templated function named getIdx that searches an array of elements for a specific element and returns - 1 if the element isn't present or x where x is the index in the array where the element was located. For example, given the following array: int arr[] = {1,2,3,4,5,6}; getIdx(3,arr,6) would return 2 and getldx(15,arr,6) would return -1. HTML Editora BIVA - A - IX EE II x x : B12 NVX V 112pt
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
