Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!beach.cis.ufl.edu!thoth From: thoth@beach.cis.ufl.edu (Robert Forsman) Newsgroups: comp.lang.c Subject: pointers to arrays Message-ID: <19784@uflorida.cis.ufl.EDU> Date: 16 Feb 89 13:33:42 GMT Sender: news@uflorida.cis.ufl.EDU Reply-To: thoth@beach.cis.ufl.edu () Organization: UF CIS Department Lines: 18 OK, Gordon cross wants to take the address of an array, but not in any normal way. If E is an array (yes I know it's upper case but that's what he used) the &E should return a pointer to an array. My question is "what will you use this for?" Pointers are usually used to modify things, and &E I believe would be used to modify the address of the array since that's what E is (the address of the array). YOU CAN'T DO THAT!!! Arrays are solid, cast in stone, at least until you pop 'em off the stack. Now if you have a pointer D that happens to point to the top of the array, SURE, &D, because you can modify D. E is (during it's lifetime) pretty much a constant and shouldn't be modified. THAT's why you can't do &E (try &4, it fails for probably the same reason.) THOTH out - "There's more postings coming your way comp.lang.Cers so wait until I'm done before you sue me." - me.