The C <stdio.h> header provides generic file operation support and defines a number of functions with narrow and multibyte character input/output capabilities, and the <wchar.h> header provides functions with wide character input/output capabilities. These functions are available to use in a current program after including the header file using - #include <stdio.h>. Functions and macros of this header file are listed below:
Functions | Description |
fprintf() |
Writes formatted data to stream. |
fscanf() |
Reads formatted data from stream. |
printf() |
Prints formatted data to stdout. |
scanf() |
Prints formatted data to stdout. |
sprintf() |
Writes formatted data to a string. |
snprintf() |
Writes formatted data to a sized buffer. |
sscanf() |
Reads formatted data from string. |
vfprintf() |
Writes formatted data from variable argument list to stream |
vfscanf() |
Reads formatted data from stream into variable argument list |
vprintf() |
Prints formatted data from variable argument list to stdout |
vscanf() |
Reads formatted data into variable argument list |
vsnprintf() |
Writes formatted data from variable argument list to sized buffer |
vsprintf() |
Writes formatted data from variable argument list to string |
vsscanf() |
Reads formatted data from string into variable argument list |
Functions | Description |
fread() |
Read block of data from stream. |
fwrite() |
Write block of data to stream. |
Functions | Description |
fgetpos() |
Gets the current file position indicator. |
fseek() |
Moves the file position indicator to a specific location. |
fsetpos() |
Sets the file position indicator to a specific location. |
ftell() |
Returns the current file position indicator. |
rewind() |
Sets the file position indicator to the beginning. |
Types | Description |
FILE |
Object type, capable of holding all information needed to control a stream. |
fpos_t |
Object containing information to specify a position within a file. |
size_t |
Unsigned integer type. |
Macros | Description |
stdin |
Expression of type FILE* associated with the input stream. |
stdout |
Expression of type FILE* associated with the output stream. |
stderr |
Expression of type FILE* associated with the error output stream. |
Macros | Description |
BUFSIZ |
Buffer size. |
EOF |
End-of-File. |
FILENAME_MAX |
Maximum length of file names. |
FOPEN_MAX |
Number of files that can be open simultaneously. |
L_tmpnam |
Size needed for an array of char to hold the result of tmpnam() function. |
NULL |
Null pointer. |
TMP_MAX |
Maximum number of unique filenames that is guaranteed to be possible to generate using tmpnam() function. |
SEEK_SET SEEK_CUR SEEK_END |
Argument to fseek() function indicating seeking from beginning of the file, from the current file position, and from end of the file respectively. |
_IOFBF _IOLBF _IONBF |
Argument to setvbuf() function indicating fully buffered I/O, line buffered I/O and unbuffered I/O respectively. |