Re: Find the size of a datatype
- From: "vire" <Avic.Go@xxxxxxxxx>
- Date: 23 May 2006 19:39:51 -0700
Keith Thompson wrote:
"vire" <Avic.Go@xxxxxxxxx> writes:many thaks to
Chris Dollin wrote:
so you get a constant 0 if you use NULL. right?yes ,it is true that NULL is a macro . but what is a macro ?
A name that when used is replaced by (the macro-expansion of) its
replacement text. Surely you know that?
then in
int *p=NULL;
p is a null pointer
and
int *p=(int*)0x13ff7c;
p is point to address 0x0013ff7c;
i think the null pointer is indeed point to some place(the address
0).but we just call it null.
and we can not read or write on address 0.is that right?
No.
Section 5 of the comp.lang.c FAQ, <http://www.c-faq.com/>, has a good
explanation of this. After you've absorbed that, read section 4, then
the rest of the FAQ.
Chris Dollin, Richard Bos, Flash Gordon, and Keith Thompson.
i think i should have read through the faq and the standard before i
post a new message.
now i am reading them.thank you all guys for your helpful advices.
.
- References:
- Find the size of a datatype
- From: Rahul K
- Re: Find the size of a datatype
- From: Ico
- Re: Find the size of a datatype
- From: vire
- Re: Find the size of a datatype
- From: Flash Gordon
- Re: Find the size of a datatype
- From: vire
- Re: Find the size of a datatype
- From: Chris Dollin
- Re: Find the size of a datatype
- From: vire
- Re: Find the size of a datatype
- From: Keith Thompson
- Find the size of a datatype
- Prev by Date: Re: allocate a multidimensional array dynamically
- Next by Date: Re: fork call
- Previous by thread: Re: Find the size of a datatype
- Next by thread: Fatal Error in C
- Index(es):
Relevant Pages
|
|