Created by Miroslav Biňas / mirek
FILE *fopen(const char *pathname,
const char *mode);
FILE *fp
File access mode | Meaning | Explanation | File already exists | File does not exist |
"r" | read | open file for reading | read from start | failure to open |
"w" | write | create file for writing | destroy contents | create new |
"a" | append | append to file | write to end | create new |
"r+" | read extended | open file for read/write | read from start | error |
"w+" | write extended | create file for read/write | destroy contents | create new |
"a+" | append extended | open file for read/write | write to end | create new |
int fgetc(FILE *stream);
int fseek(FILE *stream,
long offset,
int whence);
long ftell(FILE *stream);
int fprintf(FILE *stream,
const char *format,
...);
int fscanf(FILE *stream,
const char *format,
...);
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);