Does array initialization with a string literal cause two memory storage? [duplicate]
问题 This question already has answers here : String literals: Where do they go? (8 answers) Closed 7 days ago . int main() { char a[] = "123454321"; } "123454321" is a string literal and a string literal sets aside memory storage. a is defined by the statement which also causes memory storage. That is, this simple statement char a[] = "123454321"; causes two memory storage, one is for a and the other is for "123454321" . Is it right? 回答1: Yes, that's right. Note that the object on the right of