Originally Posted by
Char*Pntr
Hi,
It's my understanding that address of the first byte of a char arrray is the name itself. That seems to be the context you are using. Loose the [] off of "a", and you'll have just the name itself.
Try instead this:
Let me know if this helps.
Happy coding! :-)
They are not functionally identical.
What the OP has written is,
Code:
char a[6] = {'H', 'e', 'l', 'l', 'o', '\0'};
If you're still wondering why "Hello" isn't in the .rodata segment. Then you shouldn't be poking around in there... (You shouldn't be anyway). String literals are implementation-defined regarding modification -- usually read-only.