Program concatenate two string

Google Advertisements

Prev Tutorial Next Tutorial

Program to concatenate two string

Combined two string means add both string with each other, we can perform this operation using library function or without library function. For example if first string is john and second string is porter then after combined these string output is johnporter.

program combined two string

#include<stdio.h>
#include<conio.h>
#include<string.h>

void main()
{
char *ch1="john ";
char *ch2="porter";
char *ptr;
clrscr();
printf("\n\n1 st String: %s",ch1);
printf("\n\n2 nd String: %s",ch2);
strcat(ch1,ch2);
printf("\n\nString is: %s",ch1);
getch();
}

Output

1 st String: john
2 nd String: porter
String is: johnporter

Prev Tutorial Next Tutorial

Google Advertisements

Buy This Ad Space @$50 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 8076671483

Pure VPN Privide Lowest Price VPN Just @ $1.65. Per Month with Non Detected IP Lowest Price Non Detected IP VPN

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

Cloud computing is the on demand availability of computer system resources, especially data storage and computing power, without direct active management by the user. Cloud Computing Tutorial

College Projects Related to Java, AWT, C Projects for College, C++ Projects for College, Android Projects. Download Java C C++ Projects

Download Projects

Adsense Advertisements


Buy This ads Space 8076671483

Buy This Ad Space @$120 per Month, Ad Size 300X600 Contact on: hitesh.xc@gmail.com or 8076671483 Try this Keyword C++ Programs