Question: Trying to do this in C++ Question 3: Implement following functions: a. void reverseArray(int arr[], int arrSize) That takes arr, an array of integers, and
Trying to do this in C++

![void reverseArray(int arr[], int arrSize) That takes arr, an array of integers,](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f4622ea08bf_95066f4622e39471.jpg)
Question 3: Implement following functions: a. void reverseArray(int arr[], int arrSize) That takes arr, an array of integers, and its size, arrSize. When called, it reorders the elements of the array to appear in a reverse order. For example, if arr is an array containing [1, 2, 3, 4], after calling reverseArray, arr will look like: [4, 3, 2, 1]. b. void removeOdd (int arr[, int& arrSize) That takes arr, an array of integers, and its size, arrSize. When called, the function alters arr so that the only numbers in it at the end are the even ones, which should remain in their original relative order. Additionally, the function updates arrSize so it contains the new logical size of the array after removing the odd numbers (note that arrSize is a parameter used both for input and output) For example, if arr is an array containing [1, 2, 3, 4], after calling removeOdd, arr will look like: [2, 4], and the parameter arrSize will update to 2. Notice the values in arr [2] and arr[3] are discarded. c. void splitParity (int arr[], int arrSize) That takes arr, an array of integers, and its size, arrSize. When called, the function changes the order of numbers in arr so that all the odd numbers will appear first, and all the even numbers will appear last. Note that the inner order of the odd numbers and the inner order of the even numbers don't matter. For example, if arr is an array containing [1, 2, 3, 41, after calling splitParity, arr could look like: [3, 1, 2, 4]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
