作者在 2017-04-15 10:59:19 发布以下内容
#include<stdio.h>
int main()
{
char a[30]="I am a boy.",b[]="I am a student.";
int i=0,j;
j=strlen(a);
printf("a is:%s\n",a);
printf("b is:%s\n",b);
while(b[i]!='\0')
{
a[j]=b[i];
i++;
j++;
}
a[j]='\0';
printf("%s\n",a);
return 0;
}
int main()
{
char a[30]="I am a boy.",b[]="I am a student.";
int i=0,j;
j=strlen(a);
printf("a is:%s\n",a);
printf("b is:%s\n",b);
while(b[i]!='\0')
{
a[j]=b[i];
i++;
j++;
}
a[j]='\0';
printf("%s\n",a);
return 0;
}