Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.unix.questions Subject: Re: Question on printf() Message-ID: <13077@smoke.BRL.MIL> Date: 7 Jun 90 19:56:41 GMT References: <24674.266e3b81@kuhub.cc.ukans.edu> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 10 In article <24674.266e3b81@kuhub.cc.ukans.edu> jian@kuhub.cc.ukans.edu writes: >that if I don't do any I/O and linefeed after printf(), the printf() does >not print the string argument on the standard output. Why? How can I avoid >this problem? Just insert the following immediately after you call printf(): fflush(stdout); This will force the data buffered by stdio for the stdout stream to be sent to the output device; normally that occurs only at each new-line.