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++

Write the following program in C++ Question 1 15 pts Write a

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!