PROGRAM FOR STRING CONCATENATION USING CPP
#include<conio.h>
#include<iostream.h>
#include<string.h>
void main()
{
char name1[40],name2[40];
clrscr();
cout<<"enter your
first name";
cin>>name1;
cout<<"Enter your
second name";
cin>>name2;
strcat(name1,name2);
cout<<"your name
is"<<name1;
getch();
}
OUTPUT:
Enter your first name revathy
Enter your second name vijayan
your name is revathy vijayan
No comments: