*ptr = 'hello world";
if we try to modify the content the result is undefined when i worked with gcc in unix.
But i can modify the content in Turbo c. How it worked i got confussed.
This is one of those things that the standards allow implementations to "do their own thing" on. A string literal may (or may not) be in read-only memory as a constant. So, gerard4143 is absolutely correct if you want to modify the contents of the string in a platform-neutral manner. … Read More