编一个程序,将名为“d:\f1.txt”的文本文件复制在同一目录下,文件名改为“f2.txt”。
#include #include void main() {FILE*fl,*f2;  int i;  if((fl=fopen("d:\f1.txt","r"))==NULL)        {printf("call not open file!\n");exit(0);}     if((t2=fopen("d:\f2.txt","W"))==NULL)        {printf("can not open file!\n");exit(0);}     for(i=0;i<200;i++)        {if(feof(f1))break;         fputc(f.getc(f1),f2);/*实现复制功能*/        }  fclose(f1);fclose(r2); }