C盘中P1.c.txt文件的内容为:abcdeo A盘中P1.c.txt为空文档。 #include #include main() { FILE*f1*f2; int k; if(( f1=fopen("C

admin2016-12-25  29

问题 C盘中P1.c.txt文件的内容为:abcdeo A盘中P1.c.txt为空文档。
    #include
    #include
    main()
    { FILE*f1*f2;
    int k;
    if(( f1=fopen("C:\\p1.c.txt","r"))==NULL)
    { printf("can not open file!\n");
    exit(0);
    }
    if((f2=fopen( "A:\\p1.c.txt","w"))==NULL)
    { prlintf( "can not open file!\n");
    exit(0);
    }
    for(k=l;k<=500;k++)
    { if( feof( f1)) break;
    fputc(fgetc( f1) ,f2);
    }
    fc10se( f1);
    fc10se(f2);
    }
    以上程序的功能是________。

选项

答案把C盘中的P1.c.txt文件复制到A盘的P1.c.txt中。

解析
转载请注明原文地址:https://kaotiyun.com/show/8tAx777K
0

随机试题
最新回复(0)