![[Dept of Engineering]](http://www.eng.cam.ac.uk/images/house_style/engban-s.gif)
Next: Input
Up: Interactive
Previous: Interactive
For efficiency, writing to files under Unix is usually buffered, so
printf(....) might not immediately produce bytes at stdout.
Should your program crash soon after a printf() command you
might never see the output.
If you want to force synchronous output you can
- Use stderr (which is usually unbuffered) instead of stdout.
- Use fflush(stdout) to flush out the standard output buffer.
- Use setbuf(stdout,NULL) to stop standard output being buffered.
Tim Love
1999-10-06