[C/C++]C语言中字符串常量存储在哪里
char str1[] = "abcd";
char str2[] = "abcd";
const char str3[] = "abcd";
const char str4[] = "abcd";
const char *str5 = "abcd";
const char *str6 = "abcd";
char *str7 = "abcd";
char *str8 = "abcd";
cout << ( str1 == str2 ) << endl;//0
cout << ( str3 == str4 ) << endl;//0
cout << ( str5 == str6 ) << endl;//1
cout << ( str7 == str8 ) << endl;//1
详细可以看以下链接