C program for merge two strings , C/C++ Programming

Assignment Help:

C Program for MERGE TWO STRINGS

main()

{

          char a[100],b[100];

          int i=0,j,k=0;

          clrscr();

          printf("ENTER THE FIRST STRING: ");

          gets(a);

          printf("ENTER THE SECOND STRING: ");

          gets(b);

          for(i=0;a[i]!='\0';i++);

                   for(j=0;b[j]!='\0';j++,i++)

                             a[i]=b[j];

          a[i]='\0';

          printf("\n%s",a);

          getch();

}

OUTPUT :

ENTER THE 1 STRING: KAMLESH

ENTER THE 2 STRING: MENGAR

 

KAMLESH MENGAR

 


Related Discussions:- C program for merge two strings

Luminous jevel, Ask queByteland county is very famous for luminous jewels. ...

Ask queByteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colo

C program to display the contents of file on a screen, Program is to displa...

Program is to display the contents of file on a screen: Write a program to display the contents of file on a screen void main()   {  clrscr();  ifstream fin("ascii

Memory management operator, Memory Management Operator In C malloc( ), ...

Memory Management Operator In C malloc( ), calloc( ), realloc( ), and free( ) are used to mange dynamic memory.  In addition to these function C++ have derived two unary ope

Described access privileges in c++? what is the default , A: In C++ the acc...

A: In C++ the access privileges are public, private and protected. The default access level assigned to members of a class is private. Private members of any class are accessible o

Compiler design-limit the methods, Problem : Compiler Design - Limit the me...

Problem : Compiler Design - Limit the methods Rahul is a newbie to the programming and while learning the programming language he came to know the following rules: ·

Explain zero based addressing, Explain zero based addressing. - Array s...

Explain zero based addressing. - Array subscripts always start at zero. - These subscript values are used to identify elements in the array. - As subscripts start at 0, a

Radix sort - c program, Radix sort - C program: Write a program in c t...

Radix sort - C program: Write a program in c to define a radix sort. void main() {  int array[100],n;  int i;  void radix(int *,int);  printf ("How many nos\

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