linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fabio Andres Miranda <fabiomiranda@racsa.co.cr>
To: linux-c-programming@vger.kernel.org
Subject: Pointers to int
Date: Fri, 28 Oct 2005 07:19:26 -0600	[thread overview]
Message-ID: <4362255E.90303@racsa.co.cr> (raw)

Hello,

Can anyone explain to the list how this pointers to int work:
    int *p;
    p = (int *)(array);
    for (i = 0; i < arraysize - 1; i += 4)
        *p++ = j - 8;
    *p = 0x0;

P is defined as a pointer to a int. Then, it points to (the beginning ? 
) a char array.
What is the result of perform the instruction: *p++; ?
First, what is it? It adds 1 to what?

Thanks for a detailed explanation,

fabolo

             reply	other threads:[~2005-10-28 13:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-28 13:19 Fabio Andres Miranda [this message]
2005-10-28 16:05 ` Pointers to int Christoph Bussenius
2005-10-28 16:09   ` Christoph Bussenius
2005-10-29 15:44 ` 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=4362255E.90303@racsa.co.cr \
    --to=fabiomiranda@racsa.co.cr \
    --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).