the segment which stores "hello" may be read only, so writing to it
may cause unexpected result.

On Thu, Apr 21, 2011 at 6:45 PM, rahul <[email protected]> wrote:
> will crash... :)
>
> On Thu, Apr 21, 2011 at 4:14 PM, riti gupta <[email protected]> wrote:
>>
>> is there any error in following code?
>> main
>> {
>>  char *p="hello";
>> p[0]='j';
>> p[1]='j';
>> puts(p);
>> }
>>
>> --
>> 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.
>
> --
> 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.
>



-- 
Regards
Anders

-- 
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