Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: Does NEWLINE always flush stdio buffer? Keywords: stdio printf I/O Message-ID: <10482@smoke.BRL.MIL> Date: 2 Jul 89 03:29:16 GMT References: <11012@ihlpl.ATT.COM> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 10 In article <11012@ihlpl.ATT.COM> knudsen@ihlpl.ATT.COM (Knudsen) writes: >I'd always understood that printf'ing any string ending in '\n' >(newline) would flush the I/O buffer. >... >Does anyone know the "official" rules of the traditional stdio library? Yes, they're described in TFM. By default (i.e. unless setbuf() or setvbuf() is used to change it), terminal output is line-buffered, stderr is unbuffered, and all other I/O streams are fully (block) buffered.