char a[10] = "123"; /*正确,在定义的时候初始化*/

char a[10];

a = "123"; /*错误,不能用“=”直接为字符数组赋值*/

strcpy(a, "123"); /*正确,使用strcpy函数复制字符串*/




长风破浪会有时,直挂云帆济沧海!