Header File <stdio.h>

The header file provides the following functionality:

Macros

stdin
stdout
stderr

EOF
FILENAME_MAX
L_tmpnam
TMP_MAX

SEEK_SET
SEEK_CUR
SEEK_END

int getc( FILE *fp );
int getchar( void );
int putc( int c, FILE *fp );
int putchar( int c );

Types

FILE
fpos_t

Functions

FILE *freopen( const char *filename, const char *mode, FILE *stream );
FILE *fopen( const char *filename, const char *mode );
int fflush( FILE *stream );
int fclose( FILE *stream );
int remove( const char *filename );
int rename( const char *oldname, const char *newname );
char *tmpnam( char *s );

int fprintf( FILE *stream, const char *format, ... );
int printf( const char *format, ... );
int sprintf( char *s, const char *format, ... );
int snprintf( char *s, size_t n, const char *format, ... );

int vfprintf( FILE *stream, const char *format, va_list arg );
int vprintf( const char *format, va_list arg );
int vsprintf( char *s, const char *format, va_list arg );
int vsnprintf( char *s, size_t n, const char *format, va_list arg );

int fscanf( FILE *stream, const char *format, ... );
int scanf( const char *format, ... );
int sscanf( char *s, const char *format, ... );

int fgetc( FILE *stream );
char *fgets( char *s, int n, FILE *stream );
int fputc( int c, FILE *stream );
int fputs( const char *s, FILE *stream );
char *gets( char *s );
int puts( const char *s );
int ungetc( int c, FILE *stream );

unsigned int fread( void *ptr, unsigned int size, unsigned int nobj, FILE *stream );
unsigned int fwrite( const void *ptr, unsigned int size, unsigned int nobj, FILE *stream );
int fseek( FILE *stream, long offset, int origin );
long ftell( FILE *stream );
void rewind( FILE *stream );
int fgetpos( FILE *stream, fpos_t *ptr);
int fsetpos( FILE *stream, const fpos_t *ptr );

 
Limitations

The *printf family of functions by default rely on the Win32API wvsprintf function for formatting the string. This limits the number of available format specifiers and modifiers (most notably there is no support for floating point numbers).

ungetc only works with the fget*, get* and *scanf functions.

The *scanf family of functions do not support floating point numbers.

getenv and the *printf family of functions use a fixed-size buffer to format the result (1024 bytes in the current release).

Streams are not buffered.

Missing

Functions tmpfile, setvbuf, setbuf, clearerr, feof, ferror and perror.

Additions

-

Notes

The snprintf and vsnprintf functions bring in the WCRT output code, which is comparatively large.