#include<stdio.h>
int main()
{
char s1[80],s2[40],i=0,j=0;
scanf("%s",s1); //不能加\n
scanf("%s",s2); //不能加\n
while(s1[i]!='\0')
i++;
while(s2[j]!='\0')
{s1[i++]=s2[j++];}
s1[i]='\0';
printf("%s\n",s1);
return 0;
}
将两个字符串连接,不用strcat函数
猜你喜欢
转载自blog.csdn.net/zhangxue1232/article/details/104836061
今日推荐
周排行