#include "stdio.h"
#define M 30
int main()
{
char sub1[M],sub2[M];
char *ps1=sub1,*ps2=sub2;
printf("string 1: ");
gets(ps1);
printf("string 2: ");
gets(ps2);
while(*ps1!='\0')
ps1++;
while(*ps2!='\0')
*ps1++=*ps2++;
*ps1='\0';
printf("new string : ");
puts(sub1);
return 0;
}