69,373
社区成员
发帖
与我相关
我的任务
分享
#include<stdio.h>
void copy_string(char *from, char *to)
{
for(;*from!='\0';from++,to++)
*to=*from;
*to='\0';
}
int main()
{
char a[]="I am a teacher.";
char b[]="I am a student.";
printf("%s\n%s\n",a,b);
copy_string(a,b);
printf("%s\n%s\n",a,b);
}