linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Progga <abulfazl@juniv.edu>
To: linux-c-programming@vger.kernel.org
Cc: gkmohan@rocsys.com
Subject: Re: pointer initialization of string constant
Date: Sun, 23 Jan 2005 18:45:50 +0600	[thread overview]
Message-ID: <20050123184550.B330@Imrashi.net.bd> (raw)
In-Reply-To: <1106461572.1122.1.camel@KrishnaMohan>; from gkmohan@rocsys.com on Sun, Jan 23, 2005 at 11:56:11AM +0530

On Sun, Jan 23, 2005 at 11:56:11AM +0530, Krishna Mohan wrote:
> 
> main()
> {
>         char *ptr = "abc";
>         ptr[0] = 'p';

 Since ptr points to read-only mem, changing ptr[0] does not seem to be a very
wise idea.



  reply	other threads:[~2005-01-23 12:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-23  6:26 pointer initialization of string constant Krishna Mohan
2005-01-23 12:45 ` Progga [this message]
2005-01-23 13:36   ` Krishna Mohan
2005-01-24  5:49     ` how to implement tail -n Venkatesh Joshi
2005-01-24  6:30       ` Eric Bambach
2005-01-25 14:10         ` Robert Lorentz
2005-01-24 19:26       ` Glynn Clements

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050123184550.B330@Imrashi.net.bd \
    --to=abulfazl@juniv.edu \
    --cc=gkmohan@rocsys.com \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).