Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!sun-barr!cs.utexas.edu!csd4.milw.wisc.edu!marque!lakesys!chad From: chad@lakesys.UUCP (D. Chadwick Gibbons) Newsgroups: comp.lang.c Subject: Re: address of function Summary: now address of arrays Message-ID: <717@lakesys.UUCP> Date: 13 Jun 89 05:47:53 GMT References: <2700@solo8.cs.vu.nl> <370@msor0.UUCP> Reply-To: chad@lakesys.UUCP (D. Chadwick Gibbons) Organization: Lake Systems - Milwaukee, Wisconsin Lines: 18 In article <370@msor0.UUCP> kt@msor0.UUCP (Keith Tizzard) writes: | ... and does ANSI permit the following ? | int this[100], *that = &this; Not exactly; more like: int this[100], *that = this; -or- int this[100], *that = &this[0]; As with a function, the name by itself implies the address of the first element of the array. To specify a different element as the location for your pointer, you must use the second form, and specify the array bounds as you require. -- D. Chadwick Gibbons, chad@lakesys.lakesys.com, ...!uunet!marque!lakesys!chad