___  ___    _ _    _  _ _____   _____
 / __|/ _ \  | | |  | || |_ _\ \ / / __|
| (_ | (_) | |_  _| | __ || | \ V /| _|
 \___|\___/    |_|  |_||_|___| \_/ |___|

 --- A GOPHER-LIKE INTERFACE FOR HIVE BLOCKCHAIN ---

C program to merge two array

BY: @shivangi | CREATED: March 11, 2018, 12:37 p.m. | VOTES: 6 | PAYOUT: $4.53 | [ VOTE ]

Array is the collection of same type of data elements. In this blog we will learn to merge two array of same size named as a & b in a single array c.

          

Program :

include< stdio.h>

include<conio.h>

int main()

{

int a[50],b[50],c[100],i,n,j,m;

printf("Enter the value of n and m :");

scanf("%d%d",&m,&n);

printf("Enter the value of array :\n");

for(i=0;i<n;i++)

{

scanf("%d",&a[i]);

}

for(i=0;i<m;i++)

{

scanf("%d",&m);

}

j=0;

for(i=-;i<n;i++)

{

c[j]=a[i];

printf("%d",a[i]);

j++;

}

for(i=0;i<m;i++)

{

c[j]=b[i];

printf("%d",b[i]);

j++;

}

retrun 0;

}

TAGS: [ #steemit ] [ #money ] [ #programming ] [ #technology ] [ #include ]

Replies

NO REPLIES FOUND.

[ BACK TO TRENDING ] [ BACK TO MENU ]
CMD>