正确答案: C

程序完成将一个磁盘文件复制到另一个磁盘文件中

题目:阅读以下程序及对程序功能的描述,其中正确的描述是#include <stdio.h>main(){ FILE *in,*out; char ch,infile[10],outfile[10]; printf("Enter the infile name:\n"); scanf("%s",infile); printf("Enter the outfile name:\n"); scanf("%s",outfile); if((in=fopen(infile,"r"))==NULL) { printf("cannot open infile\n"); exit(0); } if((out=fopen(outfile,"w"))==NULL) { printf("cannot open outfile\n"); exit(0); } while(! feof(in))fputc(fgetc(in),out); fclose(in); fclose(out);}

解析:本题主要考查文件的操作。从选项中我们可以知道,本题是对两个磁盘文件进行相关操作。

查看原题

举一反三的答案和解析:

  • [单选题]设序列长度为n,在最坏情况下,时间复杂度为O(log2n)的算法是()。
  • 二分法查找


  • [单选题]“640K存储器”是指下列( )。
  • 640×210Bytes的存储器


  • 推荐下载科目: 计算机二级 计算机三级 软考初级 职称计算机 通信工程师 计算机操作员中级 计算机操作员高级 计算机辅助设计 其他 LTE认证
    @2019-2026 不凡考网 www.zhukaozhuanjia.com 蜀ICP备20012290号-2