glibc版本:2.32
IDE:vscode
个人认为比较常用的,可以看看源码的函数,总结下:
stdio.h
路径:\glibc\libio\stdio.h
函数原型 | 功能 |
---|---|
输入 | |
int fprintf (FILE *__restrict __stream, const char *__restrict __format, ...); |
格式化输出到文件 |
int printf (const char *__restrict __format, ...); |
格式化输出到标准输出 |
int sprintf (char *__restrict __s, const char *__restrict __format, ...) __THROWNL; |
格式化输出到字符串中 |
int snprintf (char *__restrict __s, size_t __maxlen, const char *__restrict __format, ...) __THROWNL __attribute__ ((__format__ (__printf__, 3, 4))); |
格式化输出指定长度内容到字符串中 |
输出 | |
int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __wur; |
从文件中读取格式化字符 |
int scanf (const char *__restrict __format, ...) __wur; |
从标准输入读取格式化字符 |
int sscanf (const char *__restrict __s, const char *__restrict __format, ...) __THROW; |
从字符串中读取格式化字符 |
获取字符 |