This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

pointers &arrays[]


In a recent chat room discussion, pointer notation of arrays in C was
brought up.  The question is, are array names pointers?  Is array
subscripting another form of pointer notation, or visa-versa?  I realize
the pointer notation works for everything except sizeof() (and maybe
others).  So that

array == &array[0]
array == &array
*array == array[0]
*(array+n) == array[n]

are all true given array[n].  In this case, sizeof(array) returns the size
of the entire array, not array[0].  Are there other examples where this
pointer notation fails?
Lastly, is this pointer notation implementation dependent or is it part of
the de facto standard?

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]