#include<stdio.h>
#include<stdlib.h>
#include<string.h>
void main()
{
char b[80]={'\0'},a[80]={'\0'};
char *p=a,*q=b;
printf("请输入2个字符串");
gets(p);
gets(q);
printf("请输出2个字符串:");
puts(p); puts(q);
if(strlen(p)>strlen(q))
{
strcat(p,q);
printf("连接后的字符串:");
puts(p);
}
else
{
strcat(q,p);
printf("连接后的字符串:");
puts(p);
system("pause");
}
}