Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rochester!cornell!batcomputer!braner From: braner@batcomputer.tn.cornell.edu (braner) Newsgroups: comp.lang.c Subject: Re: pointers to arrays Message-ID: <1555@batcomputer.tn.cornell.edu> Date: Thu, 20-Nov-86 14:35:34 EST Article-I.D.: batcompu.1555 Posted: Thu Nov 20 14:35:34 1986 Date-Received: Fri, 21-Nov-86 05:07:40 EST References: <273@bms-at.UUCP> <1138@genrad.UUCP> Reply-To: braner@batcomputer.UUCP (braner) Organization: Theory Center, Cornell University, Ithaca NY Lines: 17 Keywords: What? Why? How? Summary: Another advantage: size-independent functions [] Oops: I forgot to add that another advantage of the "char *line[]" approach is that you can do: char **cp; cp = &line[k]; ... cp++; /* point to pointer to next line */ - there is no need for a multiplication in the last statement, and, even more important, you can do all that in a function which does not "know" the length of a "line" - it can be written to work with any length, by passing the line[] to it instead of page[]! You do have to initialize line[] first, as posted. - Moshe Braner, Cornell University