C program for function of merge , C/C++ Programming

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

Posted Date: 9/10/2012 7:49:02 AM | Location : United States







Related Discussions:- C program for function of merge , Assignment Help, Ask Question on C program for function of merge , Get Answer, Expert's Help, C program for function of merge Discussions

Write discussion on C program for function of merge
Your posts are moderated
Related Questions


Algorithm for railway ticket booking process

Difference between Echo and print statement. print()and echo() are language constructs in PHP, both are used to output strings. Both statements are of almost same Speed. ech

Step 1 Define the start of the program    It should be noted that within C all commands should end in a semi-colon. For most of your programs the definition of a program header as

Implement the search property from catalogue menu option.  After selecting this option the user should be asked to specify the property using the following sub-menu: 1. Specif


Write a Program that illustrate Command Line Parameters? main(int argc, char *argv[]) { int i; for(i = 0; i printf("arg %d: %s\n", i, argv[i]); return 0; }

Produce data from fixed OCR areas scanned. Project Description: Project is to design software which can use character recognition only on certain areas of scanned puff's/ jpe

Explain what are Unions? The Unions like as structures, contain members whose individual data types may perhaps differ from one another. Though the members that create a union