#include <stdio.h>
main()
{
F.ILE *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);
}
A.程序完成将磁盘文件的信息在屏幕上显示的功能
B.程序完成将两个磁盘文件合二为一的功能
C.程序完成将一个磁盘文件复制到另一个磁盘文件中
D.程序完成将两个磁盘文件合并并在屏幕上输出
[单选题]阅读以下程序及对程序功能的描述,其中正确的描述是#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"
[单选题]阅读以下程序及对程序功能的描述,其中正确的是#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"))==NUL
[单选题]阅读以下程序及对程序功能的描述,其中正确的描述是includemain(){ FILE*in,*out;char阅读以下程序及对程序功能的描述,其中正确的描述是 #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"
[单选题]阅读以下程序及对程序功能的描述,其中正确的是includemain(){FILE*in,*out;charch,inf阅读以下程序及对程序功能的描述,其中正确的是 #include<stdio.h> main() { FILE*in,*out; charch,infile[10],outfile[10]; printf("Enter the infile name:/n"); scanf("%s",infile); printf("Enter the outfile name:/n"
[单选题]阅读以下程序以及对程序功能的描述,其中正确的描述是()。includemain(){FILE * in,*out阅读以下程序以及对程序功能的描述,其中正确的描述是( )。 #include <stdio.h> main() { FILE * in,*out; charch,infile[10],outfile[10]; printf("Enter the infile name:/n"); scanf("%s",infile); printf("Enter the outfile na
[单选题]阅读以下程序:include<stdio.h>main( ){int case;float printF;printf("请输人2个数:");scanf("%d%fl"&case,&printF);printf("%d ofof/n",case,printF);}该程序在编译时产生错误,其出错原因是( )。A.定义语句出错,case是关键字,不能用做用户自定义标识符B.定义语句出错,printF不能用做用户自
[单选题]请阅读以下程序:#include<stdio.h>main(){ int x=1,y=0,a=0,b=0;switch(x){ case 1:switch(y){ case 0:a++;break; }case 2:a++,b++;break; }printf(" a=%d,b=%d/n",a,b);上面程序的输出结果是A.a=2,b=1B.a=1,b=1C.a=1,b=0D.a=2,b=2
[试题]以下程序的输出结果是 _[9]_______ .#include <stdio.h>main(){ int n=12345,d;while(n!=0){ d=n%10; printf("%d",d); n/=10;}}
[单选题]阅读以下程序#include<stdio,h>main( ){ int case;float printF;printf(“请输入2个数:”);scanf(“%d%f”,&zase,&rintF);prinff(“%d%f\n”,case,printF);}该程序在编译时产生错误,其出错原因是A.定义语句出错,ca8e是关键字,不能用作用户自定义标识符B.定义语句出错,pfintF不能用作用户自定义标识符C.定义语句无错,scanf不能作为输入函数使用D.定义语句无错
[单选题]有以下程序#include <stdio.h>#include <string.h>typedef struct{ char name[9]; char sex; float score[2]; }STU;void f(STU a){ STU b={"Zhao",′m′,850,900}; int i;strcpy(a.name,b.name);a.sex=b.sex;for(i=0;i<2;i++) a.score[i]=b.score[i];}main(){