Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 1
    That's wrong. The array holds a copy of the string literal - it's not the same array. Commented Aug 26, 2009 at 18:09
  • Maybe I was a bit ambiguous. Let me clarify: there is a variable named amessage. There is a string whose contents are "now is the time". The address of amessage is the same as the address of the "n" in that string. That's the relationship I'm talking about. Granted, there may be other copies of "now is the time" floating about in the program's address space, but I'm talking about the copy that's stored in the array. Commented Aug 26, 2009 at 18:23
  • Now it makes much sense to me. Thanks for the further explanation! Commented Aug 26, 2009 at 18:53
  • @DanMoulding I have edited to combine the edit with the original text. As it stood, the unedited opening paragraph was misleading. Hope this is OK! Commented Jul 28, 2015 at 6:27
  • @M.M how is &amessage same as &amessage[0] Commented Dec 27, 2016 at 2:52