Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!sri-spam!ames!sdcsvax!ucsdhub!jack!crash!gryphon!sarima From: sarima@gryphon.UUCP Newsgroups: comp.lang.c Subject: Re: Address of array Message-ID: <2486@gryphon.CTS.COM> Date: Fri, 4-Dec-87 23:22:29 EST Article-I.D.: gryphon.2486 Posted: Fri Dec 4 23:22:29 1987 Date-Received: Thu, 10-Dec-87 03:16:30 EST References: <126@citcom.UUCP> <163@mccc.UUCP> Reply-To: sarima@gryphon.CTS.COM (Stan Frisen) Organization: Trailing Edge Technology, Redondo Beach, CA Lines: 21 In article <163@mccc.UUCP> pjh@mccc.UUCP (Peter J. Holsberg) writes: > >OK - perhaps you had better tell us neophytes what you mean by the >address of an array! > Alright, I hope I can express this clearly. From the context in of the original article, the "address of an array" is a pointer to an "entire" array, rather than just to the first element of it. That is it is a pointer to an object of size sizeof(array) rather than an object of size sizeof(array[0]), thus adding one to such a pointer will result in a pointer to the next array object rather than the next element of the current array. To put this as a 'C' type declaration: a pointer to an array is of type: BASETYPE (*array_ptr)[ARRAYSIZE]; The most common way to get such a thing is to declare a two dimensional array and then write an expression like 'array[n]', with only one subscript. This evaluates to a pointer to the first sub-array of the two dimensional array. I hope I have not confused you too much with this rambling description:-)