Merge Two Array Program in C

Advertisements

Prev Tutorial Next Tutorial

Merge Two Array Program in C

In this program we enter an elements in any two array and then these two array (elements of array) are store in third array.

Merge Two Array Program in C

#include<stdio.h>
#include<conio.h>

void main()
 {
   int a[10],b[10],c[20],i;
   clrscr();
   printf("Enter Elements in 1st Array: ");
   for(i=0;i<10;i++)
   {
   scanf("%d",&a[i]);
   }
   printf("Enter Elements in 2nd Array: ");
   for(i=0;i<10;i++)
   {
   scanf("%d",&b[i]);
   }
   printf("\nElements of Array After Merge: ");
   for(i=0;i<10;i++)
   {
    c[i]=a[i];
    c[i+10]=b[i];
   }
   for(i=0;i<20;i++)
   {
   printf(" %d",c[i]);
   }
  getch();
 }

Output

program to merge array
Prev Tutorial Next Tutorial

Advertisements

Buy This Ad Space @$20 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 8076671483

Pure VPN Privide Lowest Price VPN Just @ $1.65. Per Month with Non Detected IP Lowest Price Non Detected IP VPN

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

Download Projects

Advertisements


Buy Websites 9999595223

Buy Fresh and Payment Receive Media.net Account with Website. Contact on: hitesh.xc@gmail.com or 9999595223 Try this Keyword C++ Programs