Merging of Arrays

Merging two arrays means combining two separate arrays into one single array. For instance, if the first array consists of 3 elements and the second array consists of 5 elements then the resulting array consists of 8 elements. This resulting array is known as a merged array.

Algorithm

  1. Input the two array sizes and their elements.
  2. Declare another array with size equal to the sum of both sorted arrays.
  3. Copy the elements of first array into final array.
  4. Copy the elements of second array into the final array.
  5. Print the third array.

Program using C