char * is pointer to constant data...here...that's y it would crash...dear..
do somedebugging....

On Thu, Apr 21, 2011 at 4:16 PM, riti gupta <ritigupt...@gmail.com> wrote:

> why?can u please explain?
>
>
> On Thu, Apr 21, 2011 at 4:15 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.
>>
>
>  --
> 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.

Reply via email to