关于文件的读写操作与内容的写入

#include <stdio.h>
main()
{ FILE *f;
f=fopen("filea.txt","w");
fprintf(f,"abc");
fclose(f);
}

 


若文本文件filea.txt中原有内容为:hello,则运行以上程序后,文件filea.txt中的内容为

abc

内容为重新写入后的内容

 

posted @ 2015-09-13 12:24  Mr__sun  阅读(249)  评论(0编辑  收藏  举报