Date: Thu, 4 Dec 1997 17:24:58 -0800 (PST) Message-Id: <199712050124.RAA26244@adit.ap.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: Peter Palotas , "A. Sinan Unur" From: Nate Eldredge Subject: Re: Simple beginner questions Cc: djgpp AT delorie DOT com Precedence: bulk At 07:37 12/4/1997 -0500, Peter Palotas wrote: >>make a habit of setting fp to NULL after closing it. AFAIK, files do not >>close themselves. > >I actually think that the libc exit code does this for you, although it is >probably not defined in the ANSI standard that the files should be closed, >but DJGPP does this, I think. DJGPP quite definitely does it. I expect that it is part of the ANSI standard, since automatically closing files is guaranteed as far back as K&R I. Of course, it is best to close a file when you finish with it. Nate Eldredge eldredge AT ap DOT net