Write A C++ Program To Merge Two Given Arrays Into A Third Array.

Write a C++ program to Merge two given arrays into a third array.
(adsbygoogle = window.adsbygoogle || []).push({}); Program Code:#includeusing namespace std;int main() {int a[10],b[10],c[20],i;
cout<<"Enter elements in first array : ";for(i=0;i<5;i++){cin>>a[i];}cout<cout<<"Enter elements in second array : ";for(i=0;i<5;i++){cin>>b[i];}cout<cout<<"Elements of array after merge first and second array : ";for(i=0;i<5;i++){c[i]=a[i];c[i+5]=b[i];}for(i=0;i<10;i++){cout<}return 0;}

The program code is tested on www.jdoodle.com (adsbygoogle = window.adsbygoogle || []).push({}); Output:Enter elements in first array : 1 3 5 2 4  Enter elements in second array : 2 3 4 5 6 Elements of array after merge first and second array : 1 3 5 2 4 2 3 4 5 6 

ThanksMukesh Rajput