有如下程序:include main (){FILE*fp1;fp1=fopen ("fl.txt", "w");fprintf(fp1,"abc" 有如下程序:#include <stdio. h>main (){ FILE *fp1; fp1=fopen ("fl.txt", "w"); fprintf(fp1,"abc"); fclose (fp1);}若文本文件f1.txt 中原有内容为:good,则运行以上程序后文件f1.txt 中的内容为( )。A.goodabcB.abedC.abcD.abcgood

有如下程序:include main (){FILE*fp1;fp1=fopen ("fl.txt", "w");fprintf(fp1,"abc"

有如下程序:#include <stdio. h>main (){ FILE *fp1; fp1=fopen ("fl.txt", "w"); fprintf(fp1,"abc"); fclose (fp1);}若文本文件f1.txt 中原有内容为:good,则运行以上程序后文件f1.txt 中的内容为( )。

A.goodabc

B.abed

C.abc

D.abcgood


相关考题:

有以下程序includemain(){FILE*fp;inta[10]={1,2,3},i,n;fp=fopen("d1.daf","w");for( 有以下程序 #include <stdio.h> main() {FILE *fp; int a[10]={1,2,3},i,n; fp=fopen("d1.daf","w"); for(i=0;i<3;i++) fprintf(fp,"%d",a[i]); fprintf(fp,"\n"); fclose(fp); fp=fopen("d1.dat","r"); fscanf(fp,"%d",n); fclose(fp);A.12300B.123C.1D.321

有如下程序includemain(){FILE*fpl; fpl=fopen("f1.txt","w"); fprintf(fp1,"abc"); f 有如下程序 #include<stdio.h> main() { FILE *fpl; fpl=fopen("f1.txt","w"); fprintf(fp1,"abc"); fclose(fp1); } 若文本文件f1.txt中原有内容为:good,则运行以上程序后文件f1.txt中的内容为A.goodabcB.abcdC.abcD.abcgood

请补充main 函数,该函数的功能是:把文本文件B中的内容追加到文本文件A的内容之后。例如,文佃的内容为“I’m ten.”,文件A的内容为“I’ m a student!”,追加之后文件A的内容为“I’m a student !I’m ten.”注意:部分源程序给出如下。请勿改动主函数main 和其他函数中的任何内容,仅在函数main 的横线上填入所编写的若干表达式或语句。试题程序:include<stdio, h>include<conio. h>define N 80main(){FILE *fp, * fp1, *fp2;int i;char c[N] ,t, ch;clrscr ();if ((fp=fopen ("A. dat ", "r") ) == NULL){printf ("file A cannot be opened\n");exit (0);}printf("\n A contents are : \n\n");for (i=0; (ch=fgetc (fp)) !=EOF; i++){C [i]=ch;putchar (c [i]);fclose (fp);if((fp=fopen ("B. dat", "r") )==NULL){printf ("file B cannot be opened\n");exit (0);}printf("\n\n\nB contents are : \n\n");for (i=0; (ch=fgetc (fp)) !=EOF; i++){c [i] =ch;putchar (c [i]);}fclose (fp);if ( (fp1=fopen ("A.dat" ,"a"))【 】(fp2=fopen ("B. dat", "r") ) ){while ( (ch=fgetc (fp2)) !=EOF)【 】;}else{printf("Can not open A B !\n");}fclose (fp2);fclose (fp1);printf ("\n***new A contents***\n\n");if ( ( fp=fopen ("A. dar", "r") )==NULL){printf ("file A cannot be opened\n");exit (0);}for (i=0; (ch=fgetc (fp)) !=EOF;i++){c [i] =ch;putchar (c [i] );}【 】;}

有以下程序:include main(){FILE*fp;int i,k,n; fp=fopen("data.dar","w+");for(i=1;i 有以下程序: #include <stdio.h> main() { FILE *fp; int i,k,n; fp=fopen("data.dar","w+"); for(i=1;i<6;i++) { fprintf(fp,"%d ",i); if(i%3==0) fprintf(fp,"\n"); } rewind(fp); fscanf(fp,"%d%d",k,n); printf("%d%d\n",k,n); fclose(fp); } 程序运行后的输出结果是( )。A.0 0B.123 45C.1 4D.1 2

有以下程序include main(){FILE *fp;int i=20,j=30,k,n;fp=fopen("d1.dat","w");fprin 有以下程序 #include <stdio.h> main() { FILE *fp; int i=20,j=30,k,n; fp=fopen("d1.dat","w"); fprintf(fp,"%d\n",i);fprintf(fp,"%d\n",j); fclose(fp); fp=fopen("d1.dat", "r"); fp=fscanf(fp,"%d%d",k,n); printf("%d%d\n",k,n); fclose(fp); } 程序运行后的输出结果是A.20 30B.20 50C.30 50D.3020

有以下程序:include main( ){FILE * fp; int i,k,n;fp = fopen( "data. dat" ,"w +" ) 有以下程序:#include <stdlo.h>main( ){ FILE * fp; int i,k,n; fp = fopen( "data. dat" ,"w +" ) for(i = 1 ;i<6;i ++ ) { fprintf(fp."% d",i); if(i%3 ==0)fprintf(fp," \n"); } rewind(fp); fscanf(fp." % d% d" ,k, n) ;printf(" % d%d \n" ,k,n); fclose(fp);A.0 0B.123 45C.1 4D.1

有以下程序: include main() {FILE *fp; int i,k,n; fp=fopen("data 有以下程序: #include <stdio.h> main() {FILE *fp; int i,k,n; fp=fopen("data.dat","w+"); for(i=1;i<6;i++) {fprintf(fp,"%d ",i); if(i%3==0) fprintf(fp,"\n"); } rewind(fp); fscanf(fp,"%d%d",k,n); printf("%d %d\n",k,n); fclose(fp); } 程序运行后的输出结果是 ______。A.0 0B.123 45C.1 4D.1 2

有如下程序:include main(){ FILE*fp1;fp1=fopen("f1.txt","w");fprintf(fp1, "abc"); 有如下程序: #include <stdio.h> main() { FILE *fp1; fp1=fopen("f1.txt","w"); fprintf(fp1, "abc"); fclose(fp1); } 若文本文件f1.txt中原有内容为good,则运行以上程序后文件f1.txt中的内容为( )。A.goodabcB.abcdC.abcD.abcgood

有以下程序:includemain(){FILE*fp;int a[10]={1,2,3},i,n;fp=fopen("d1.dat","w");fo 有以下程序: #include<stdio.h> main() {FILE*fp;int a[10]={1,2,3},i,n; fp=fopen("d1.dat","w"); for(i=0;i<3;i++)fprintf(fp,"%d",a[i]); fprintf(fp,"\n"); fclose(fp); fp=fopen("d1.dat","r"); fscanf(fp,"%d",&n); fclose(fp); printf("%d\n",n); 程序的运行结果是( )。A.12300B.123C.1D.321

有以下程序 include main() {FILE*f; f=fopen("filea.txt","w"); fprintf(f,"abc") fc 有以下程序#include<stdio.h>main(){ FILE*f;f=fopen("filea.txt","w");fprintf(f,"abc")fclose(f);}若文本文件filea.txt中原有的内容为:hello,则运行以上程序后,文件filea.txt中的内容为A.helloabcB.abcloC.abcD.abchello

有如下程序#include〈stdio.h〉main(){FILE *fp1;fp1=fopen("f1.txt","w");fprintf(fp1,"abc");fclose(fp1);}若文本文件f1.txt中原有内容为:good,则运行以上程序后文件f1.txt中的内容为A.goodabcB.abcdC.abcD.abcgood

以下程序的功能是# include stdio.hmain (){ FILE *fp1;*fp2; fp1=fopen ("file1","r"); fp2=fopen ("file2","w"); while (!feof (fp1)) fputc (fgetc (fp1),fp2); fclose (fp1); fclose (fp2);}A.将磁盘文件的内容显示在屏幕上 B.将两个磁盘文件合为一个C.将一个磁盘文件复制到另一个磁盘文件中D.将两个磁盘文件合并后送屏幕

有以下程序 include main() { FILE *fp1; fp1=fopen("f1.txt","w"); fprintf(fp1,"ab 有以下程序 #include <stdio.h> main() { FILE *fp1; fp1=fopen("f1.txt","w"); fprintf(fp1,"abc"); fclose(fp1); } 若文本文件f1.txt中原有内容为:good,则运行以上程序后,文件n.txt中的内容为______。A.goodabcB.abcdC.abcD.abcgood

有以下程序includemain(){FILE*fp;int i=20,j=30,k,n;fp=fopen(“d1.dat”,“w”);fprintf 有以下程序 #include<stdio.h> main() { FILE*fp;int i=20,j=30,k,n; fp=fopen(“d1.dat”,“w”); fprintf(fp,“%d\n”,i);fprintf(fp,“%d\n”,j); fclose(fp); fp=fopen(“d1.dat”,“r”); fscanf(fp,“%d%d”,k,n);printf(“%d%d\n”,k,n); fclose(fp); } 程序运行后的输出结果是A.20 30B.20 50C.30 50D.30 20

有如下程序: #includestdio.h main { FILE*fp1; fp1=fopen("f1.txt","w"); fprintf(fp1,"abe"); fclose(fp1); } 若文本文件f1.txt中原有内容为:good。则运行以上程序后文件f1.txt中的内容为( )。A. goodabcB.abcdC.abcD.abcgood

有如下程序includemain(){FILE*fp1;fp1;fopen("ftxt","w");fprintf(fpl, "abc")fclose 有如下程序 #include <stdio.h> main() { FILE *fp1; fp1;fopen("ftxt","w"); fprintf(fpl, "abc") fclose(fpl); } 若文本文件f1.txt中原有内容为:good,则运行以上:程序后文件f1.Mt中的内容为A.goodabcB.abcdC.abcD.abcgood

有如下程序#include stdio.hmain(){ FILE *fp1; fp1=fopen("f1.txt","w"); fprintf(fp1,"abc"); fclose(fp1);}若文本文件f1.txt中原有内容为good,则运行以上程序后,文件f1.txt中的内容为A.goodabc B.abcd C.abc D.abcgood

有如下程序:includestdio.hmain{ FILE*fp1;fp1=fopen(f1.txt,wstdio.hmain{ FILE*fp1;fp1=fopen(f1.txt,w);fprintf(fp1,abe);fclose(fp1);}若文本文件f1.txt中原有内容为:good。则运行以上程序后文件f1.txt中的内容为( )。A.goodabcB.bcdC.abcD.abcgood

以下程序的功能是()includemain(){FILE * fp1;*fp2;fp1=fopen("filel","r");fp2=fopen 以下程序的功能是( ) #include<stdio.h> main() {FILE * fp1; *fp2; fp1=fopen("filel","r"); fp2=fopen("file2","w"); while(!feof(fp1)) fputc(fgetc(fp1),fp2); fclose(fp1);fclose(fp2);}A.将磁盘文件的内容显示在屏幕上B.将两个磁盘文件合为一个C.将一个磁盘文件复制到另一个磁盘文件中D.将两个磁盘文件合并后送屏幕

有以下程序: include main( ) { FILE *fp; int i=20,j=50,k,n; fp=fopen("d1.da 有以下程序: #include<stdi0.h> main( ) { FILE *fp; int i=20,j=50,k,n; fp=fopen("d1.dat","W"); fprintf(fp,"%d\n",i);fprintf(fp,"%d\n",j); fclose(fp); fp=fopen("d1.dat","r",); fscanf(fp,"%d%d",&k,&n); printf("%d%d\n",k,n); fclose(fp); } 程序运行后的输出结果是A.20 30B.20 50C.30 50D.30 20

有如下程序: include main ( ){FILE* fpl;fp1 = fopen("ftxt" ,"w");fpfinff( fp1 ," 有如下程序: #include <stdio.h> main ( ) { FILE* fpl; fp1 = fopen("ftxt" ,"w"); fpfinff( fp1 ," abc" ); fclose ( fp1 ); 若文本文件f1.txt中原有内容为:good,则运行以上程序后文件f1.txt中的内容为( )。A.goodabcB.abcdC.abcD.abegood

以下程序的功能是()。includemain(){FILE*fPl;*fp2;fp1:fopen("file1","r");fp2:fopen( 以下程序的功能是( )。 # include <stdio.h> main() {FILE*fPl; *fp2; fp1:fopen("file1","r"); fp2:fopen("file2","w"); while(! Feof(fP1)) fputc(fgetc(fP1),fp2); fclose(fP1);fclose(fp2);}A.将磁盘文件的内容显示在屏幕上B.将两个磁盘文件合为一个C.将一个磁盘文件复制到另一个磁盘文件中D.将两个磁盘文件合并后送屏幕

对于如下程序:  #include    main( )  {    FILE *fp;    fp=fopen(“file.txt”,“w”);    fprintf(fp,“%s”,“xyz”);    fclose(fp);  }  若文件file.txt中原有的内容为good,则运行该程序以后,文件file.txt中的内容为()

下列程序的功能是()。   #include   main( )   { FILE *fp1,*fp2;    fp1=fopen(“d1.dat”,“r”);  fp2=fopen(“d2.dat”,“w”);    while(!feof(fp1))     fputc(fgetc(fp1),fp2));    fclose(fp1);    fclose(fp2);   }

单选题有以下程序:#include main(){ FILE *f; f=fopen(filea.txt,w); fprintf(f,abc); fclose(f);}若文本文件filea.txt中原有内容为:hello,则运行以上程序后,文件filea.txt中的内容为(  )。AHelloabcBabcloCabcDabchello

填空题对于如下程序:  #include    main( )  {    FILE *fp;    fp=fopen(“file.txt”,“w”);    fprintf(fp,“%s”,“xyz”);    fclose(fp);  }  若文件file.txt中原有的内容为good,则运行该程序以后,文件file.txt中的内容为()

填空题下列程序的功能是()。   #include   main( )   { FILE *fp1,*fp2;    fp1=fopen(“d1.dat”,“r”);  fp2=fopen(“d2.dat”,“w”);    while(!feof(fp1))     fputc(fgetc(fp1),fp2));    fclose(fp1);    fclose(fp2);   }