Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Address of array Message-ID: <6835@brl-smoke.ARPA> Date: 15 Dec 87 05:08:38 GMT References: <126@citcom.UUCP> <163@mccc.UUCP> <422@xyzzy.UUCP> <329@dlhpedg.co.uk> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB)) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 12 In article <329@dlhpedg.co.uk> cl@.co.uk (Charles Lambert) writes: >... the name of the array being a synonym for its address; ... By oversimplifying, you got it wrong. The name of an array is converted IN SOME CONTEXTS to a pointer to the first element of the array. These contexts do not include as the operand of the sizeof operator nor (as of ANSI C) as the operand of &. As Chris Torek remarked, "address" should not be bandied about when talking about C; C is a typed language, and its pointers have definite types. Understanding the &array issue requires being careful about type distinctions.