concerning stdio functions: write to file is buffered (does not react on \n) write to terminal is line-buffered (autoflushes on \n) http://www.pixelbeat.org/programming/stdio_buffering/