I am reading some C text at the address: https://cs.senecac.on.ca/~btp100/pages/content/files.html
in the section \"OPENING A FILE
\", the author wrote:
When you open a file with "r+" then the file is open for reading and writing BUT the file must exist first. If you open it with "w" then the file will be created so it does not need to exist. Hope that helps.
Of course, there are some writing into a file which can fail (think of a "disk is full" situation).
The "possible writing" phrase means just that a FILE*
handle fopen
-ed with "r+"
might be used without any write operations. For instance, if your application want to overwrite some part of the file only under some circumstances, it can avoid the writing.
It's poor wording. It should be:
r+
Open file for update (reading and writing).