On Sun, Mar 23, 2008 at 3:03 PM, N i v a s <[EMAIL PROTECTED]> wrote:
> Hello together,
>
>   char arr[] = "ABCDEF";
>   char *ptr = "STUVWXYZ";
>
>   arr[2] = 'X';     //No probs
>   ptr[2] = 'K';   //Error
>
>   why I'm not able to change the second array contents using ptr?

See http://c-faq.com/decl/strlitinit.html

-- 
PJH

A man walks into a bakery, points and the girl behind the counter
"Is that a macaroon or a meringue?"
"No, you're right, it's a macaroon."

Reply via email to