File input/output

File input/output

The <stdio.h> header provides generic file operation support and supplies functions with narrow character input/output capabilities.

The <wchar.h> header supplies functions with wide character input/output capabilities.

I/O streams are objects of type FILE that can only be accessed and manipulated through pointers of type FILE* (Note: while it may be possible to create a local object of type FILE by dereferencing and copying a valid FILE*, using the address of such copy in the I/O functions is undefined behavior). Each stream is associated with an external physical device (file, standard input stream, printer, serial port, etc).

I/O streams can be used for both unformatted and formatted input and output. They are locale-sensitive and may perform wide/multibyte conversions as necessary. All strea