写过多少次 printf(“Hello World!”);
但是printf的兄弟们您了解么?
#include
int printf(const char *restrict format, ...);
int fprintf(FILE *restrict stream, const char *restrict format, ...);
int dprintf(int fd, const char *restrict format, ...);
int sprintf(char *restrict str, const char *restrict format, ...);
int snprintf(char *restrict str, size_t size, const char *restrict format, ...);
#include
int vprintf(const char *restrict format, va_list ap);
int vfprintf(FILE *restrict stream, const char *restrict format, va_list ap);
int vdprintf(int fd, const char *restrict format, va_list ap);
int vsprintf(char *restrict str, const char *restrict format, va_list ap);
int vsnprintf(char *restrict str, size_t size, const char *restrict format, va_list ap);
int printf(const char *restrict format, ...);
输出到stdout标准化输出
int fprintf(FILE *restrict stream, const char *restrict format, ...);
输出到stream文件流
int dprintf(int fd, const char *restrict format, ...);
输出到fd文件描述符
int sprintf(char *restrict str, const char *restrict format, ...);
va_list格式参数输出到str字符指针
int snprintf(char *restrict str, size_t size, const char *restrict format, ...);
输出到str字符指针(指定长度)
int vprintf(const char *restrict format, va_list ap);
va_list样式的参数列表,输出到stdout标准化输出
int vfprintf(FILE *restrict stream, const char *restrict format, va_list ap);
va_list样式的参数列表,输出到stream文件流
int vdprintf(int fd, const char *restrict format, va_list ap);
va_list样式的参数列表,输出到fd文件描述符
int vsprintf(char *restrict str, const char *restrict format, va_list ap);
va_list样式的参数列表,输出到str字符指针
int vsnprintf(char *restrict str, size_t size, const char *restrict format, va_list ap);
va_list样式的参数列表,输出到str字符指针(指定长度)