I can't understand the description of the "a" and "a+" option in the C fopen api documentation. The option in "a+" is append and update. What is the meaning of the word update here?
Here is what the man pages (
man fopen) say:
Open for appending (writing at end of file). The file is created if it does not exist. The stream is positioned at the end of the file.
Open for reading and appending (writing at end of file). The file is created if it does not exist. The initial file position for reading is at the beginning of the file, but output is always appended to the end of the file.
for a+: pointer initially is at the start of the file ( for reading ) but when a write operation is attempted it is moved to the end of the file.