將兩個字符串連接起來,不要用strcat函數(shù)。
#include<stdio.h>
int main()
{int i=0,j=0;
char s1[100],s2[100];
gets(s1);
gets(s2);
while(s1[i]!='\0')
s1[i++]=s2[j++];
s1[i]='\0';
printf("The new string is:%s\n",s1);
}
- 0 回答
- 0 關(guān)注
- 1316 瀏覽
添加回答
舉報
0/150
提交
取消