comp.lang.c FAQ list
I'm still mystified.
Is a pointer a kind of array,
or is an array a kind of pointer?
An array is not a pointer,
nor vice versa.
An array reference
any mention of an array
in a value context),
turns into a pointer
(see questions 6.2
There are perhaps three ways to think about the situation:
- Pointers can simulate arrays
(though that's not all;
see question 4.1).
- There's hardly such a thing as an array
(it is, after all, a ``second-class citizen'');
the subscripting operator  is in fact a pointer operator.
- At a higher level of abstraction,
a pointer to a block of memory is
effectively the same
as an array
(though this says nothing about other uses of pointers).
But, to reiterate, here are two ways not to think about it:
``They're completely the same.''
(False; see question 6.2.)
``Arrays are constant pointers.''
(False; see question 6.9.)
See also question 6.8.
about this FAQ list