Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!munnari!kre From: kre@munnari.oz (Robert Elz) Newsgroups: comp.unix.wizards Subject: Re: have I found a bug in K&R? Message-ID: <1840@munnari.oz> Date: Wed, 30-Sep-87 07:45:11 EDT Article-I.D.: munnari.1840 Posted: Wed Sep 30 07:45:11 1987 Date-Received: Sat, 3-Oct-87 08:21:55 EDT References: <517@hubcap.UUCP> Organization: Comp Sci, Melbourne Uni, Australia Lines: 18 Keywords: argv definition In article <517@hubcap.UUCP>, hubcap@hubcap.UUCP (Mike S Marshall) writes: > k&r: "...(argv) is a pointer to an array of character strings..." > > isn't it more correct to say that argv is an array of pointers to character > strings? Not really, argv is a pointer to an array of pointers to null terminated arrays of characters. A pointer to a null terminated array of characters is what is colloquially callyed a "character string" (eg: "abc" .. which is a pointer to a null terminated array of characters). So k&r's description is right. That argv is a pointer, and not an array is a crucial difference, if argv were an array, "argv++;" would be an illegal statement. kre