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
Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send

A:  it is containing and hiding Information regarding an object, like internal data structures and code. It isolates the internal complication of an object's operation from the res

Description: Create a program that allows the user to track the hours an employee worked in a week. How much the employee was paid and any extra hours worked (overtime pay).

The Malt Shop restaurant charges $2.99 for burgers, $1.29 for fries, and $1.25 for sodas.  Write a program that allows a restaurant employee to enter an order (the number of bur


I have a program for school and I am not understanding why one of the variables gets skipped or the arithmetic operators aren''t having any effect as I have tryed defining it sever

#Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new techn

There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides. But he sometimes mistakes doing that

Damjibhai and Shamjibhai are two jeweler friends. They decide to play a simple game. The game comprises of removing the jewels for polishing, turn by turn. Once a jewel is removed

Explain the Declaration of Multi Dimensional Arrays? In the figure, the range in the first dimension is 3 and in the second dimension is 4. The shaded portion corresponds to th