#include<iostream.h>
#include<conio.h>
void main()
{
char str1[20], str2[20], rev[20],*p1,*p2;
int cnt=0;
clrscr();
cout<<"\n Concatenation of String";
cout<<"\n Enter two Strings";
cin>>str1>>str2;
p1=&str1[0];
p2=&str2[0];
while(*p1!='\0')
{
p1++;
}
while(*p2!='\0')
{
*p1=*p2;
p1++;
p2++;
}
*p1='\0';
cout<<"\nConcatenated String is "<<str1;
cout<<"\nReverse of String";
p2=&str2[0];
while(*p2!='\0')
{
p2++;
cnt++;
}
p2--;
p1=&rev[0];
while(cnt>0)
{
*p1=*p2;
p2--;
p1++;
}
*p1='\0';
cout<<"\n Reverse String is :\t"<<rev;
getch();
}