题目内容
阅读以下程序及对程序功能的描述,其中正确的描述是()。#includevoid main(){FILE *in, *out;char infile[10],outfile[10];int c;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 ((ch=fgetc(in))!=EOF)fputc(ch,out);fclose(in);fclose(out);}
查看答案
搜索结果不匹配?点我反馈