Re: Address of an array = address of its 1st element: undecidable question ?
- From: Richard Heathfield <rjh@xxxxxxxxxxxxxxx>
- Date: Fri, 23 May 2008 01:24:41 +0000
candide said:
Hi,
I try to find out what exactly means "an array and its address are the
same"
They aren't. An array is an array. An address is a pointer value. These are
not the same thing. If you mean that &array and &array[0] are the same,
they aren't. They have different types.
or "have the same value".
If you try to take the value of an array, what you actually get is the
value of a pointer to the first member of the array. That doesn't mean
that an array is the same as a pointer. If you mean that &array and
&array[0] have the same value, they don't. They have different types.
Everybody seems to agree that they doesn't share the same type, of
course.
And therefore they cannot have the same value.
<snip>
So what ? Is the question undecidable ?
No. The question was decided long ago.
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
.
- Follow-Ups:
- Re: Address of an array = address of its 1st element: undecidable question ?
- From: Peter Nilsson
- Re: Address of an array = address of its 1st element: undecidable question ?
- References:
- Prev by Date: Address of an array = address of its 1st element: undecidable question ?
- Next by Date: Re: memfrob and strfry ? OT
- Previous by thread: Address of an array = address of its 1st element: undecidable question ?
- Next by thread: Re: Address of an array = address of its 1st element: undecidable question ?
- Index(es):
Relevant Pages
|