char a[] = “hello”;a[0] = ‘X’;cout << a << endl;char *p = “world”; // 注意p指向常量字符串p[0] = ‘X’; // 编译器不能发现该错误cout << p << endl;