#include "stdio.h"
#include "string.h"
#define M 10
void main()
{
int i,j;
char a[M],b[M];
printf("Input string A: ");
gets(a);
printf("Input string B: ");
gets(b);
if((strlen(a)+strlen(b) > M-2) || (strlen(a)>=M)|| (strlen(b)>=M)
)
{
printf("string is too long!!\n");
exit (0);
}
j=strlen(a);
a[j]=',';
//哈哈.做个分隔符,
for(i=0;b[i]!='\0';i++)
{
j++;
a[j]=b[i];
}
a[j+1]=b[i];
printf("%s\n",a);
}