寫個小程序測試一下,就明白a模式有什麼陷阱了。

授人以渔,不授人以鱼。
2015-08-12 11:05
程序代码:
#include <stdio.h>
int main(void)
{
FILE* file = fopen("test.txt", "a+");
fputs("check!", file);
fputc(EOF, file);
fclose(file);
return 0;
}

2015-08-12 11:11

2015-08-12 22:55

2015-08-12 23:21

2015-08-12 23:42