2013高级语言程序设计期中考试答案(10)
发布时间:2021-06-07
发布时间:2021-06-07
}
#include <stdio.h>
int main()
{ char s1[80],s2[40];
int i=0,j=0;
printf("input string1:");
scanf("%s",s1);
printf("input string2:");
scanf("%s",s2);
while (s1[i]!='\0')
{
i++;
//printf("i=%d, s1[i]=%c\n",i-1,s1[i-1]);
}
while(s2[j]!='\0')
{
s1[i++]=s2[j++];
//printf("i=%d, s1[i]=%c\n",i-1,s1[i-1]);
}
s1[i]='\0';
printf("\nThe new string is:%s\n",s1);
return 0;
}
上一篇:焊接技能实训
下一篇:易经故事之一:智慧人生64个感悟