printf, fprintf, sprintf, snprintf
Defined in header
<stdio.h> |
||
(1) | ||
?int printf( const char *format, … );?
|
||
?int printf( const char *restrict format, … );?
|
||
(2) | ||
int fprintf( FILE *stream, const char *format, … );
|
||
int fprintf( FILE *restrict stream, const char *restrict format, … );
|
||
(3) | ||
int sprintf( char *buffer, const char *format, … );
|
||
int sprintf( char *restrict buffer, const char *restrict format, … );
|
||
int snprintf( char *restrict buffer, int buf_size,
const char *restrict format, … ); |
(4) | |
Loads the data from the given locations, converts them to character string equivalents and writes the results to a variety of sinks.
1) Writes the results to stdout.
2) Writes the results to a file stream
stream
.3) Writes the results to a character string
buffer
.4) Writes the results to a character string
buffer
. At most buf_size
– 1 characters are written. The resulting character string will be terminated with a null character, unless buf_size
is zero.