求解一个文件方面的问题
#include<stdio.h>#include<stdlib.h> //为了使用exit函数;
int main()
{
FILE *fp,*p;
char ch;
fp=fopen("D:\\file1.dat","r");
p=fopen("D:\\file2.dat","w");
if(fp==NULL)
{
printf("无法打开该文件\n");
exit(0);
}
if(p==NULL)
{
printf("无法打开该文件\n");
exit(0);
}
while(!feof(fp))
{
ch=fgetc(fp);
fputc(ch,p);
putchar(ch);
}
putchar('\n');
fclose(fp);
fclose(p);
return 0;
}
为何输出中(computer and c