IO进程线程第二天(7.26)fputs,fgets,fwrite,fread,fseek,ftell,用fread和fwrite实现文件拷贝,用fgets实现拷贝并计算一个文件有几行和几个字符
1.用fread和fwrite实现文件拷贝:#include#includeintmain(intargc,constchar*argv[]){FILE*fp=fopen("1.c","r");if(NULL==fp){ERR_MSG("fopen");return-1;}FILE*fq=fopen("copy1.txt","w");if(NULL==fq){ERR_MSG("fopen");re