字符串连接 题解:C
#include <stdio.h>
#include <string.h>
int main()
{
char s1[200],s2[100],*p,*q;
while(scanf("%s",s1) != EOF)
{
scanf("%s",s2);
p = s1;
q = s2;
while(*p != '\0') p++;
while(*q != '\0')
{
*p = *q;
p++;
q++;
}
*p = '\0';
printf("%s\n",s1);
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发