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 <rahulr...@gmail.com> wrote:
> will crash... :)
>
> On Thu, Apr 21, 2011 at 4:14 PM, riti gupta <ritigupt...@gmail.com> 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 algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> 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 algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> 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 algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to