Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 SMI; site sun.uucp Path: utzoo!decvax!decwrl!sun!guy From: guy@sun.uucp (Guy Harris) Newsgroups: net.lang.c Subject: Re: arrays, anyone? Message-ID: <2800@sun.uucp> Date: Sun, 15-Sep-85 19:20:20 EDT Article-I.D.: sun.2800 Posted: Sun Sep 15 19:20:20 1985 Date-Received: Mon, 16-Sep-85 00:27:56 EDT References: <390@ur-helheim.UUCP> <2748@sun.uucp> <277@cisden.UUCP> Distribution: na Organization: Sun Microsystems, Inc. Lines: 16 > >Now, to reference A(10,100): > > > > (*a)[99][9]; > WRONG! > Declaring an array [99] means the valid values are from 0 -> 98 . > See K&R page 20. WRONG! The above code fragment is a reference, not a declaration (the word "reference" in the first sentence might give you a clue here). If you check the original article, you'll notice that the array was declared as having more than 99 rows and having more than 9 elements in each row. As such, the valid subscript values definitely include 99 for the first subscript and 9 for the second. Guy Harris