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 <[email protected]> wrote:

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

Reply via email to