Write a program to merge two unsorted 1D
double arrays in descending
Note: You need to define the following functions:
void inputarray(int size, double* array);
This function should prompt the user for input and hence input all array elements from the
void printarray(int size, double* array);
This function should print all array elements.
void sortarray(int size, double * array, char order);
This function should sort the array which will be given as the first argument. The second
argument will be ‘A’ or ‘D’ to specify ascending or descending, respectively.
void mergeandsortarray(int size1, double* arr1, int size2, double* arr2, double* arr3);
This function should merge the sorted arrays arr1 and arr2 which will be given as the first and
second arguments. The third argument, arr3, will be the array obviously having the size of array
being the sum of the sizes of the first two arrays and will store the two arrays in merged and
ordered form. Note that your function call to this function must pass the sorted arrays arr1 and
arr2 and then simply merge them. Note that you must NOT use the naïve or simple algorithm
which would copy the two arrays into arr3 and then sort arr3!