Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uakari.primate.wisc.edu!caen!ox.com!math.fu-berlin.de!unidui!unido!rwthinf!marvin.e17.physik.tu-muenchen.de!berg From: berg@marvin.e17.physik.tu-muenchen.de (Stephen R. van den Berg) Newsgroups: comp.lang.c Subject: Re: fseek fread fwrite fflush Message-ID: <4210@rwthinf.UUCP> Date: 15 Apr 91 11:38:31 GMT References: <1991Apr13.003817.12434@watdragon.waterloo.edu> Sender: news@rwthinf.UUCP Lines: 20 Andrew Walduck writes: >Is it necessary to do the following? >fflush(fp); >fseek(fp....); >fwrite(fp...); >Or can I just do the following... >fseek(fp....); >fwrite(fp....); According to the ANSI standard library, the latter can be practiced. Every fseek performs an implicit fflush. Though, extra fflushes won't hurt. -- Sincerely, berg@marvin.e17.physik.tu-muenchen.de Stephen R. van den Berg. "I code it in 5 min, optimize it in 90 min, because it's so well optimized: it runs in only 5 min. Actually, most of the time I optimize programs."