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

Explain the #undef directive, The #undef Directive This directive undef...

The #undef Directive This directive undefines a previously explained macro. For, example the following will give an error since PI is undefined.                 #define PI 3

Types of linked list with the help of diagrams, Problem: (a) Describe ...

Problem: (a) Describe a linked list. (b) Explain the three different types of linked list with the help of diagrams. (c) Give two advantages and two disadvantages o

C programming., #queComputers are frequently used in check-writing systems,...

#queComputers are frequently used in check-writing systems, such as payroll and accounts payable applications. Many stories circulate regarding weekly pay- checks being printed (by

When should you use multiple inheritance, There are 3 acceptable answers: "...

There are 3 acceptable answers: "Never," "Rarely "and" When the problem domain cannot be accurately modelled any other way."

Explain mixed mode expressions and implicit type conversions, Mixed Mode Ex...

Mixed Mode Expressions and Implicit type Conversions A mixed mode expression is one in which the operands are not of the similar type. In this case, the operands are converted

Need cron job parsing json from api, Need Cron Job Parsing JSON from API, I...

Need Cron Job Parsing JSON from API, Inserting in to DB Project Description: The Project is to prepare a Cron Job with an adjustable interval in seconds and milli seconds. Cr

Area under a curve, Write a program to find the area under the curve y = f(...

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Online Tutor Available, I am an online tutor who can teach computer science...

I am an online tutor who can teach computer science and programming language. Is there any requirement for this?

I want packet capture analysis, I want Packet capture analysis Project D...

I want Packet capture analysis Project Description: Need assistance in debugging some packet capture Skills required is C Programming

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