c program for function of merge include


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

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: c program for function of merge include
Reference No:- TGS0159416

Expected delivery within 24 Hours