#include <stdio.h>
int main()
{
void copy_string(char *from,char *to);
char *a="no money no life";
char b[]="one world one dream";
copy_string(a,b);
printf("a=%s\nb=%s\n",a,b);
}
void copy_string(char *from,char *to)
{
for(;*from!='\0';from++,to++)
*to=*from;
*to='\0';
}
问题:为什么可以第五行可以写成char *a="no money no life",而第六行却不能写成char *b="one world one dream",否则运行时出错