Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!brl-tgr!tgr!jfn%vanderbilt.csnet@csnet-relay.arpa From: Fred Newsgroups: net.lang.c Subject: C declarations Message-ID: <7699@brl-tgr.ARPA> Date: Fri, 25-Jan-85 04:22:12 EST Article-I.D.: brl-tgr.7699 Posted: Fri Jan 25 04:22:12 1985 Date-Received: Mon, 28-Jan-85 07:04:27 EST Sender: news@brl-tgr.ARPA Organization: Ballistic Research Lab Lines: 26 I have a question about C declarations. The [] notation is equivalent to the * notation, right? We have int ptr[] <=> int *ptr and int *ptr[] <=> int **ptr The question concerns the [] syntax, which takes on a different meaning if data initialization occurs. For example: int ptr[]; declares one pointer but int ptr[] = { 1, 2, 3 }; declares a three element int array. Is this a desirable characteristic of C? Could someone please comment on the precise meaning of [] in declarations. Thanks, my address is CS-Net: jfn@vanderbilt