int main (void)
{
char *a="I am a teacher.";
char *b="you are a student.";
delay_init();
NVIC_Configuration();
uart_init(115200);
delay_ms(100);
printf("befor a=%s\nbefor b=%s\n",a,b);
delay_ms(100);
copy_string(a,b);
printf("after a=%s\nafter b=%s\n",a,b);
delay_ms(100);
}
//仿真结果:
befor a=I am a teacher.
befor b=you are a student.
after a=I am a teacher.
after b=you are a student.