char *p= "hello world";

When we try to modify the  above string it will raise an error. I heard that
the String constant is stored in the Data segment of the process . The data
segment consists of two parts .
1)Initialized data segment
2)Uninitialized data segment

If we use some other global variable in the same program  say static int
i=10;

But it could be modified at later.So why not the string constant cant be
modified??? Someone said that it is stored in Text/Code segment . I think
thats wrong . the Text segment is only a set of machine instructions to
execute the program ,but does not contain  any  data  values.

So, Where the above String constant is stored and why it cant be altered???

-- 
Regards
Kumar Raja
M.Tech(SIT)
IIT Kharagpur,
[email protected]
7797137043.
09491690115.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to