1 stdio.h
-
功能:处理
文件
和标准输入/输出流
的各种函数和类型 -
包含变量:
- size_t:无符号整形,
sizeof
关键字的结果 - FILE:文件流类型,适合存储文件流信息的对象类型
- size_t:无符号整形,
-
库宏:
- stderr、stdin、stdout:指向
FILE
类型的指针,分别对应于标准错误,标准输入,标准输出 - NULL:空指针
- stderr、stdin、stdout:指向
-
主要函数:
int fclose(FILE *stream) // 关闭流steram,刷新缓冲区 FILE *fopen(const char *filename, const char *mode) // 使用给定模式,打开filename所指向的文件 size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream) // 从文件中读数据 size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream) // 想文件中写入数据 // 数据流处理 int printf(const char *format, ...) // 输出到stdout int sprintf(char *str, const char *format, ...) // 发送格式化输出到字符串
2 stdlib.h
- 主要功能:
- 主要函数:
3 sys/types.h
- 主要功能:
- 主要函数:
4 sys/stat.h
- 主要功能:
- 主要函数:
5 fcntl.h
- 主要功能:
- 主要函数:
6 unistd.h
- 主要功能:
- 主要函数:
7 string.h
- 主要功能:字符串相关的
- 主要函数: