Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site spanky.UUCP Path: utzoo!linus!decvax!harpo!floyd!whuxlb!pyuxll!eisx!npoiv!npois!hogpc!houxm!hocda!spanky!ka From: ka@spanky.UUCP Newsgroups: net.lang.c Subject: Re: mixing pointers and arrays Message-ID: <446@spanky.UUCP> Date: Wed, 17-Aug-83 10:08:07 EDT Article-I.D.: spanky.446 Posted: Wed Aug 17 10:08:07 1983 Date-Received: Thu, 18-Aug-83 00:28:02 EDT References: <1737@allegra.UUCP>, <1795@umcp-cs.UUCP>, <191@cbosgd.UUCP> allegra.1742 <216@turtleva.UUCP> Organization: Bell Labs, Holmdel, N. J. Lines: 9 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 time. Kenneth Almquist