Re: Address of an array = address of its 1st element: undecidable question ?
- From: CBFalconer <cbfalconer@xxxxxxxxx>
- Date: Fri, 23 May 2008 08:47:49 -0400
Richard Heathfield wrote:
CBFalconer said:
Peter Nilsson wrote:
Richard Heathfield <r...@xxxxxxxxxxxxxxx> wrote:... snip ...
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.
What about (void *) &array == (void *) &array[0]?
You should get "syntax error" or equivalent.
Why?
Woops - I read that as '=', not as '=='. Good catch.
--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
** Posted from http://www.teranews.com **
.
- References:
- Address of an array = address of its 1st element: undecidable question ?
- From: candide
- Re: Address of an array = address of its 1st element: undecidable question ?
- From: Richard Heathfield
- 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 ?
- From: CBFalconer
- Re: Address of an array = address of its 1st element: undecidable question ?
- From: Richard Heathfield
- Address of an array = address of its 1st element: undecidable question ?
- Prev by Date: Re: Once again pointer to first element vs pointer to array cast to pointer to element
- Next by Date: Re: Address of an array = address of its 1st element: undecidable question ?
- Previous by thread: Re: 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
|