mixing pointers and arrays

ka at spanky.UUCP ka at spanky.UUCP
Thu Aug 18 00:08:07 AEST 1983

The PDP-11 C compiler accepts the construct &array to mean the address
of the array (as opposed to the address of the first element of the array).
The problem with using this feature, aside from the obvious one that it is
nonportable, is that it doesn't allow variable length arrays to be handled
without using lots of type casts.  If you have a pointer to an array you
must know the size of the array at compile time.  If you refer to an array
using the address of its first element, you can figure out the size at run
					Kenneth Almquist

More information about the Comp.lang.c mailing list