#include<stdio.h>intprintf(constchar* format, ...); //输出到标准输出
intfprintf(FILE* stream, constchar* format, ...); //输出到文件
intsprintf(char* buffer, constchar* format, ...); //输出到字符串
intsnprintf(char* buffer, int n, constchar* format, ...); //输出到字符串
1
2
3
4
5
#include<stdarg.h>intvprintf(constchar* format, va_list ap); //输出到标准输出
intvfprintf(FILE* stream, constchar* format, va_list ap); //输出到文件
intvsprintf(char* buffer, constchar* format, va_list ap); //输出到字符串
intvsnprintf(char* buffer, int n, constchar* format, va_list ap); //输出到字符串