#include<stdio.h>
int main(){
	int i=0,j=0;
	char s1[222],s2[333];
	printf("请输入第一个字符串:n");
	gets(s1);//=scanf("%s",s1);
	printf("请输入第二个字符串:n");
	gets(s2);

	while(s1[i]!='')
		i++;
	while(s2[j]!='')
		s1[i++]=s2[j++];//这里我没看懂
	s1[i]='';//等遍历
	printf("nThe new string is:%sn",s1);
	
		
	return 0;
}

在这里插入图片描述

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注