格式化输出有16个标准库函数,它们具有以下原型:
int printf(const char* restrict format, ...);
int printf_s(const char* restrict format, ...);
int sprintf(char* restrict str, const char* restrict format,...);
int sprintf_s(char* restrict str, rsize_t n, const char* restrict format, ...);
int snprintf(char * restrict, size_t, const char * restrict, ...);
int snprintf_s(char* restrict str, rsize_t n, const char* restrict format, ...);
int fprintf(FILE* restrict stream, const char* restrict format, ...);
int fprintf_s(FILE* restrict stream, const char* restrict format, ...);
int vfprintf(FILE * restrict, const char * restrict, va_list);
int vsprintf(char * restrict, const char * restrict, va_list);
int vprintf(const char * restrict, va_list);
int vsnprintf(char * restrict, size_t, const char * restrict, va_list);
int vfprintf_s(FILE * restrict, const char