[Solved]1 Arrays Write Following Array Functions Use Integer Arrays Suppose Arr 1 4 6 5 2 7 10 Se Q37191477
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, 8) should return1 Reverse the contents of the array. void reverse (int arr, int n); Using the above array arr, reverse (arr, 7) should return result in arr b. contents rearranged as follows: arr(10, 7, 2, 5, 6, 4, 11 Rearrange the array such that all the odd elements in the array are in the beginning of c. the array void oddFirst (int arr[, int n) Using the above array arr, oddFirst (arr, 7) should return result in arr contents rearranged as follows: arr(1, 5, 7, 4, 6, 2, 10) Show transcribed image text 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, 8) should return1 Reverse the contents of the array. void reverse (int arr, int n); Using the above array arr, reverse (arr, 7) should return result in arr b. contents rearranged as follows: arr(10, 7, 2, 5, 6, 4, 11 Rearrange the array such that all the odd elements in the array are in the beginning of c. the array void oddFirst (int arr[, int n) Using the above array arr, oddFirst (arr, 7) should return result in arr contents rearranged as follows: arr(1, 5, 7, 4, 6, 2, 10)
Expert Answer
Answer to 1. Arrays Write the following array functions. Use integer arrays. Suppose, arr[ – (1, 4, 6, 5, 2, 7, 10) a. Search for … . . .
OR

