Question: This is for C Programming Write a function that will merge the contents of two sorted (ascendin order) arrays of type double values, storing the

 This is for C Programming Write a function that will merge This is for C Programming

Write a function that will merge the contents of two sorted (ascendin order) arrays of type double values, storing the result in an output array (still in ascending order). The function should not assume that both its input parameter arrays are the same length. You do not need to get the values of array elements from user, instead you may use initializer lists for the two arrays. Do NOT write any sorting function for this problem. When one of the input arrays has been exhausted, do not forget to copy the remaining data in the other array into the result array. Test your function with cases in which (1) the first array is exhausted first, (2) the second array is exhausted first, and (3) the two arrays are exhausted at the same time (i.e., they end with the same value). Remember that the arrays input to this function must already be sorted.1 Sample Output Array One: -10.50, -2.00, 0.50, 5.00, 7.00, 8.00, Array Two: -100.00, -2.00, -1.10, 1.00, 3.00, 9.00, 20.0, 34.00, Merged Array: -100.00, -10.50, -2.00, -2.00, -1.10, 0.50, 1.00, 3.00, 5.00, 7.00, 8.00, 9.00, 20.00, 34.00

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!