Opening a file in 'a+ 'mode
问题 If a file is opened using the following command: FILE *f1=fopen("test.dat","a+"); The man page reads: a+ 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. So does f1 have 2 separate offset pointers, one for read & another for write? 回答1: No. There is just one pointer which initially is at the start of the file but when a