主观

C盘中p1.c.txt文件的内容为: abcde。盘中p1.c.txt为空文档。

#include< stdio.h>

#include< stdlib.h>

void main()

{

FILE *f1, *f2;

int k;

if((f1= fopen("C: \\pl. c. txt", "r"))= =NULL)

{

printf("can not open file!\n");

exit(0)

}

if((f2= fopen "D: \\p1.c. txt", w")) =NULL)

{

printf("can not open file! \n");

exit(0);

}

for(k=1;k<=500;k++)

{

if( feof(f1))break;

fputc(fgetc(f1), f2);

}

printf("复制成功");

fclose(f1);

fclose(f2);

}

参考答案
您可能感兴趣的试题
¥

订单号:

遇到问题请联系在线客服

订单号:

遇到问题请联系在线客服