C Program for FUNCTION OF MERGE
#include conio.h>
#include stdio.h>
char cot(char a[],char b[]);
void main()
{
char a[50],b[50];
clrscr();
printf("ENTER THE FIRST STRING: ");
gets(a);
printf("ENTER THE SECOND STRING: ");
gets(b);
cot(a,b);
getch();
}
char cot(char a[],char b[])
{
char p[50]; int i,j;
for(i=0;a[i]!='\0';i++)
p[i]=a[i];
p[i]=' ';
for(j=0;b[j]!='\0';j++)
p[i+j+1]=b[j];
p[i+j+1]='\0';
printf("%s",p);
}
OUTPUT :
ENTER THE 1 STRING: KAMLESH
ENTER THE 2 STRING: MENGAR
KAMLESH MENGAR