#include<stdio.h>
int main()
{
char p1[1000];
char p2[1000];
int i,j;
gets(p1);
gets(p2);
for(i=0;p1[i]!=0;i++);
for(j=0;p2[j]!=0;j++)
p1[i++]=p2[j];
p1[i]=0;
puts(p1);
return 0;
}
字符串连接问题
最新推荐文章于 2022-03-20 17:35:39 发布
#include<stdio.h>
int main()
{
char p1[1000];
char p2[1000];
int i,j;
gets(p1);
gets(p2);
for(i=0;p1[i]!=0;i++);
for(j=0;p2[j]!=0;j++)
p1[i++]=p2[j];
p1[i]=0;
puts(p1);
return 0;
}