Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!usc!apple!netcom!amdcad!dgcad!dg-rtp!sheol!throopw From: throopw@sheol.UUCP (Wayne Throop) Newsgroups: comp.lang.c Subject: Re: pointer problems, help! Summary: this doesn't seem right... Message-ID: <1491@sheol.UUCP> Date: 24 Mar 91 03:37:31 GMT References: <1991Mar22.082225.24948@bronze.ucs.indiana.edu> <1991Mar22.193636.10853@dg-rtp.dg.com> Lines: 24 - hagins@gamecock.rtp.dg.com (Jody Hagins) -- char filename[80],carriage_return[5]; - This means that you are setting aside enough space for 80 chars, and - that memory has a starting address. The starting address is stored in - the variable . No, that's not what it means. The starting address of the array (by which is probably meant the address of the first element, BTW: an important distinction to make in C) is not stored anywhere in runtime memory by this declaration, least of all "in" the variable named "filename". Where do these myths come from, anyhow? What the declaration of filename above means in C is that space for eighty characters is set aside, and this space is given the name "filename". (It might mean something different as a formal argument declaration, but that's not what it was in the example.) - I do think you need to go back to - your text, and instructor, and get a grasp on the difference between a pointer - and the data the pointer is referencing. This comment, on the other hand is correct. Another possible expression of the problem in the original post is that NULL should not be used to assign values to or to compare with characters, but rather pointers. -- Wayne Throop ...!mcnc!dg-rtp!sheol!throopw