From: Jeff Woods <kazrak+kernel@cesmail.net>
To: km <km@mrna.tn.nic.in>
Cc: Luciano Moreira - igLnx <lucianolnx@ig.com.br>,
linux-c-programming@vger.kernel.org
Subject: Re: pointer notation
Date: Tue, 28 Oct 2003 10:46:26 -0800 [thread overview]
Message-ID: <5.2.1.1.0.20031028103917.01841e48@no.incoming.mail> (raw)
In-Reply-To: <20031028174605.GA5517@mrna.tn.nic.in>
At 10/28/2003 11:16 PM +0530, km wrote:
>In the above code we can see the statement called "(*s)->previous =
>NULL;". I didnt get what exactly it means to be and how different is *s
>different from (*s) in this context. can it be written in any other form
>alternatively ?
"*s" and "(*s)" are exactly the same. However, "*s->next" and "(*s)->next"
are NOT the same because without the parentheses field selection through
the pointer ("->") wouild be done before indirection ("*") of the "handle"
(pointer to a pointer) "s". IOW, the parentheses are only there (as is
usually the case in a C expression) to control precedence of binding.
--
Jeff Woods <kazrak+kernel@cesmail.net>
prev parent reply other threads:[~2003-10-28 18:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-28 9:42 pointer notation km
2003-10-28 10:17 ` Thomas Steudten
2003-10-28 12:00 ` Luciano Moreira - igLnx
2003-10-28 17:46 ` km
2003-10-28 18:40 ` Mike Pastore
2003-10-28 18:46 ` Jeff Woods [this message]
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=5.2.1.1.0.20031028103917.01841e48@no.incoming.mail \
--to=kazrak+kernel@cesmail.net \
--cc=km@mrna.tn.nic.in \
--cc=linux-c-programming@vger.kernel.org \
--cc=lucianolnx@ig.com.br \
/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).