摘要: 源程序: //把从键盘输入的文本按原样输出到名为file_a.txt的文件中,用字符@作为键盘输入//结束的标志#include <stdio.h>#include <stdlib.h>int main(){ FILE *fpout; char ch; if((fpout=fopen("e:\\fi 阅读全文
posted @ 2019-12-13 09:31 bobo哥 阅读(817) 评论(0) 推荐(0)
摘要: 源程序: //把一个已经存在磁盘上的file_a.txt文本文件中的内容原样输出到终端上#include <stdio.h>#include <stdlib.h>int main(){ FILE *fpin; char ch; if((fpin=fopen("e:\\file_a.txt","r") 阅读全文
posted @ 2019-12-13 09:26 bobo哥 阅读(349) 评论(0) 推荐(0)
摘要: 源程序: #include <stdio.h>#include <stdlib.h>int main(){ int i; char s[100]; FILE *fp; if((fp=fopen("e:\\file.txt","w+"))==NULL) { printf("can't open thi 阅读全文
posted @ 2019-12-13 09:22 bobo哥 阅读(1700) 评论(1) 推荐(1)
摘要: 源程序: #include <stdio.h>#include <stdlib.h>void filecopy(FILE *,FILE *);int main(){ FILE *fpin,*fpout; fpin=fopen("e:\\file_a.txt","r"); fpout=fopen("e 阅读全文
posted @ 2019-12-13 09:16 bobo哥 阅读(1764) 评论(0) 推荐(0)