Please use c++, thank you!
1. Arrays Write the following array functions. Use integer arrays. Suppose, arr[ – (1, 4, 6, 5, 2, 7, 10) a. Search for a given value in the array and return the index of the location. Return -1 if not found in the array. void search (int arr, int n, int val) Using the above array arr, search (arr, 7, 6) should return 2, and search (arr, 7,
OR
OR