求帮忙,哪里错了
#include <stdio.h>int main()
{
void copy_string(char *from,char *to);
char *a="I am a teacher";
char *b="you are a student";
printf("sting a is:%s\nstring b is :%s\n",a,b);
copy_string(a,b);
printf("%s,%s",a,b);
}
void copy_string(char *from,char *to)
{
for (;*from!='\0';from++,to++)
{
*to=*from;
}
*to='\0';
}