Input and Output
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Input and Output

The I/O functions read and write data to and from files and devices. File I/O operations take place in text mode or binary mode. The Microsoft run-time library has three types of I/O functions:

  • Stream I/O functions treat data as a stream of individual characters.
  • Low-level I/O functions invoke the operating system directly for lower-level operation than that provided by stream I/O.
  • Console and port I/O functions read or write directly to a console (keyboard and screen) or an I/O port (such as a printer port).
    Note   Because stream functions are buffered and low-level functions are not, these two types of functions are generally incompatible. For processing a particular file, use either stream or low-level functions exclusively.

See Also

Run-Time Routines by Category | Run-Time Routines and .NET Framework Equivalents

© 2015 Microsoft