what is r+ in FILE structure in C?

后端 未结 3 1310
孤街浪徒
孤街浪徒 2021-01-22 07:24

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:

3条回答
  •  故里飘歌
    2021-01-22 08:08

    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.

提交回复
热议问题