Advertisement
Advertisement
FILE *fopen(const char *filename, const char *mode)
File Modes | Description |
---|---|
"r" | Searches for the file and opens it in read mode(if the file is found). If the file is not found, NULL is returned and no new file is created. |
"w" | Searches for the file and if the file is found, its contents are overwritten. If file is not found, a new file is created. Allows you to write to the file. |
"a" | Searches for the file and if the file is found, the pointer to its last character is returned. Allows you to append new data to the file. If file is not found, a new file is created. |
"r+" | Searches for the file and opens the file(if the file is found). If the file is not found, NULL is returned and no new file is created. Allows you to read, write and modify the content of file. |
"w+" | Searches for the file and if the file is found, its contents are overwritten. If file is not found, a new file is created. Allows you to read and write the content of file. |
"a+" | Searches for the file and if the file is found, the pointer to its last character is returned. Allows you to read and append new data to the file. If file is not found, a new file is created. |
Advertisement
Advertisement
Please check our latest addition
C#, PYTHON and DJANGO
Advertisement