C语言基础:文件拷贝的代码
将开发过程中较好的内容做个收藏,下边代码内容是关于C语言基础:文件拷贝的代码。
#include <stdio.h>
int main(void)
{
int letter;
if ((input = fopen("\CONFIG.SYS", "r")) == NULL)
printf("Error opening \CONFIG.SYSn");
else if ((output = fopen("\CONFIG.TST", "w")) == NULL)
printf("Error opening \CONFIG.TSTn");
else
{
while ((letter = fgetc(input)) != EOF)
fputc(letter, output);
}
return 1;
}
posted on 2019-09-03 11:27 cypress462 阅读(447) 评论(0) 收藏 举报
浙公网安备 33010602011771号