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

Assignment Help:

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


Related Discussions:- C program for function of merge

Define a function in c program, Define a function in c program: int f1...

Define a function in c program: int f1() { static int x=10; return x; } int f2() { int y=5; return y; } extern int z; void f()     {

Control flow, write the program to accept date and to say valid or invalid

write the program to accept date and to say valid or invalid

Operation on string - c ++ program, Operation on String - C ++ Program: ...

Operation on String - C ++ Program: Write a program to define operations on string in c++. class String {    char *char_ptr;   // pointer to string contents    int le

Application for tag in the forest game, Your program should use the Free Pa...

Your program should use the Free Pascal compiler or the Lazarus IDE described in CSC 540. When you hand in your assignment to the digital dropbox, it should be a .PAS file, not zip

Optimize and profile a c++ library for speed, Optimize and Profile a C++ li...

Optimize and Profile a C++ library for speed Project Description:  Optimize and Profile an existing C++ library for speed. This library uses OpenMP and OpenCV and C++ stan

Pointer, void main() { int *p, *q, i ; p=(int*)100; q=(int*)200; i=q-p; pr...

void main() { int *p, *q, i ; p=(int*)100; q=(int*)200; i=q-p; printf("%d",i); } }

Explain register variable, Explain Register Variable Computers have int...

Explain Register Variable Computers have internal registers, which are used to keep data temporarily, before any operation can be performed. Intermediate results of the calcula

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd