From: Ronaldo Zacarias Afonso <r_zaca@ig.com.br>
To: linux-c-programming@vger.kernel.org
Subject: Pointer to int
Date: Wed, 21 Jul 2004 18:11:29 -0300 [thread overview]
Message-ID: <20040721_211129_060718.r_zaca@ig.com.br> (raw)
[-- Attachment #1: Mail message body --]
[-- Type: text/plain, Size: 718 bytes --]
Hello everybody,
I'm iniciating in the C programming language and there are some things
that I realy need to understand, so the question is:
In the code:
int i;
struct some_struct *ptr;
ptr = &some_other_struct;
i = (int) ptr;
1) Is the last sentence a valid one?
2) If it is, what is realy happening?
note - It seems very stranger to me. A struct pointer being "transformed"
into a int variable.
Thanks.
_________________________________________________________________________________
Quer mais velocidade?
Só com o acesso Aditivado iG, a velocidade que você quer na hora que você precisa.
Clique aqui: http://www.acessoaditivado.ig.com.br
next reply other threads:[~2004-07-21 21:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-21 21:11 Ronaldo Zacarias Afonso [this message]
2004-07-21 23:14 ` Pointer to int Luiz Fernando N. Capitulino
2004-07-22 5:21 ` canbaby
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=20040721_211129_060718.r_zaca@ig.com.br \
--to=r_zaca@ig.com.br \
--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).