欢迎来到财会考试题库网 财会考试题库官网
logo
全部科目 > 普通考研 > 软件工程

填空题

下列程序的主要功能是()。 
#include 
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); 
}

    【参考答案】

    将一个磁盘文件复制到另一个磁盘文件中

    点击查看答案
    微信小程序免费搜题
    微信扫一扫,加关注免费搜题

    微信扫一扫,加关注免费搜题