qfedu-c-level/day14/d11.c

22 lines
332 B
C
Raw Normal View History

2023-07-21 00:58:46 +08:00
#include <stdio.h>
// 文件复制
int main()
{
FILE *aF = fopen("d11.txt", "r");
if (NULL == aF)
{
perror("fopen");
return 1;
}
FILE *bF = fopen("d11_cpy.txt", "w");
int c;
while ((c = fgetc(aF)) != EOF)
{
fputc(c, bF);
}
fclose(aF);
fclose(bF);
return 0;
}