C program to merge Two One Dimensional Arrays elements
This program will read Two One Dimensional Array of same data type (integer type) and merge them into another One Dimensional Array of same type.
To merge array elements we have to copy first array's elements into third array first then copy second array's elements into third array after the index of first array elements.
Merge Two One Dimensional Arrays using C program
Output:
Enter elements : Enter arr[0] : 12 Enter arr[1] : 23 Enter arr[2] : 34 Enter arr[3] : 45 Enter arr[4] : 56 Enter elements : Enter arr[0] : 11 Enter arr[1] : 22 Enter arr[2] : 33 Enter arr[3] : 44 Enter arr[4] : 55 Elements are : arr[0] : 12 arr[1] : 23 arr[2] : 34 arr[3] : 45 arr[4] : 56 arr[5] : 11 arr[6] : 22 arr[7] : 33 arr[8] : 44 arr[9] : 55need an explanation for this answer? contact us directly to get an explanation for this answer