题目内容
下面程序的功能是将一个磁盘中的二进制文件复制到另一个磁盘中,两个文件名随命令行一起输入,输入时原有文件的文件名在前,新复制文件的文件名在后。请在下面的程序横线处填入适当内容:#includemain(int argc,char *argv[]){FILE old,new;char ch;if(argc!=3){printf("You forgot to enter a filename\n");exit(0);}if(old=fopen(①)==NULL){printf("cannot open infile\n");exit(0);}if(new=fopen(②)==NULL){printf("cannot open outfile\n");exit(0);}while(!feof(old)){fputc(③,new);}fclose(old);fclose(new);return 0;}
查看答案
搜索结果不匹配?点我反馈