Level 72
Level 74
10 words 0 ignored
Ready to learn
Ready to review
Ignore words
Check the boxes below to ignore/unignore words, then click save at the bottom. Ignored words will never appear in any learning session.
Ignore?
r
Opens an existing text file for reading purpose.
w
Opens a text file for writing. If it does not exist, then a new file is created. Here your program will start writing content from the beginning of the file.
a
Opens a text file for writing in appending mode. If it does not exist, then a new file is created. Here your program will start appending content in the existing file content.
r+
Opens a text file for both reading and writing.
w+
Opens a text file for both reading and writing. It first truncates the file to zero length if it exists, otherwise creates a file if it does not exist.
a+
Opens a text file for both reading and writing. It creates the file if it does not exist. the reading will start from the beginning but writing can only be appended.
int fclose(FILE *fp);
Closing a File
int fputc(int c, FILE *fp);
Writing a File
int fgetc(FILE * fp);
Reading a File
read a string from a stream
char *fgets(char *buf, int n, FILE *fp);