A buffered file in C is one where writes are buffered (placed in memory) and only written when explicitly flushed or when a file is closed (fclose). An unbuffered file writes directly to disk (or to a device) without buffering to memory. Buffered files are usually faster, but you risk data loss if there is a power fail or system reset. Unbuffered files guarantee data but are much slower.
See: stdio, fopen, fclose, fflush in C
silk flowers
Subscribe to:
Post Comments (Atom)
definition is ok but may i know the examples of buffered and unbuffered files please...
ReplyDelete