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

Illustration of plot function, Illustration of Plot function: To be mo...

Illustration of Plot function: To be more common, the script could prompt the user for the time and temperature, instead of just assigning the values. Then, the axis function

Write program.., # Dear I want help to programmer that write C++ code for...

# Dear I want help to programmer that write C++ code for my small project as soon as posible If we can help me?..

Bitwise operations, Bitwise Operations 1. Write a function that has an ...

Bitwise Operations 1. Write a function that has an int parameter n, makes an integer mask having the bit 1 at the nth place from the rightmost bit, and returns the mask. For ex

Define multi file program, Define Multi File Program? While writing lar...

Define Multi File Program? While writing large programs we must divide programs up into modules. These would be separate source files and the main() function would be in one fi

C program to print l diagonal triangle, C program to print L diagonal trian...

C program to print L diagonal triangle: void main() {                 int i=0,j=0;                 int arr[rows][cols];                 for (i=0; i

Define internal static storage class - computer programming, Define Interna...

Define Internal static storage class - computer programming? The Internal static variables are those that declared inside a function. The scope of the internal static variables

Program for game of war, Objective of this Program: (a) To learn more ab...

Objective of this Program: (a) To learn more about modularization of a program into independent modules, (b) To use arrays in a program, (c) To get some experience with us

Prepare an application in c# or c++, Prepare an Application in C# or C++ ...

Prepare an Application in C# or C++ Project Description: We are seeking someone who can write a program in C# or C++. The idea is to prepare the program using a Cross Plat

Write a program to sum any pair of numbers, Write a C++ program that reads ...

Write a C++ program that reads from keyboard 3 integers, with proper input prompt, and then displays the maximum sum of any pair of numbers from these three. If the 3 numbers are 5

C program to check prime numbers , C Program to check PRIME NUMBERS   ...

C Program to check PRIME NUMBERS   main() {           int i,k,r,flag;           clrscr();           printf("ENTER THE NO. TO CHECK IT IS PRIME OR NOT: ");

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