FILE *fopen(const char* pathname, const char* type);
int fclose(FILE *fp);
int fgetc(FILE *fp);
int fputc(int c, FILE *fp);
char *fgets(char *buf, int n, FILE *fp);
int fputs(const char *str, FILE *fp);
以上,返回值為int類型的,如果出錯則返回EOF,其余藍色的返回值為指針,出錯為NULL
讀寫二進制
size_t fread(void *ptr, size_t size, size_t nobj, FILE *fp)
size_t fwrite(void *ptr, size_t size, size_t nobj, FILE *fp)
linux系統IO(非標准)
int open(const char* path, int oflag)
ssize_t read(int fd, void *buf, size_t nbytes)
ssize_t write(int fd, void *buf, size_t nbytes)
off_t lseek(int fd, off_t offset, int whence)
close(fd)