有如下程序: #include <stdio.h> main() { 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
[单选题]有如下程序#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*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
[单选题]有如下程序#include <stdio.h>main(){ 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
[单选题]以下程序的功能是()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(fp
[单选题]有下列程序: include main() { FILE *fp; int a[10]={1,2,3},i,n;有下列程序: #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=open("d1.dat","r
[单选题]有下列程序: include main() { FILE *fp; int a[10]={1,2,3},i,n;有下列程序: #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=open("d1.dat","r
[单选题]有以下程序 include main( ) { FILE *fp; int i,k=0,n=0; fp=fopen(“d1.dat”,有以下程序 #include <stdio.h> main( ) { FILE *fp; int i,k=0,n=0; fp=fopen(“d1.dat”,”w”); for(i=1;i<4;i++) fprintf(fp,”%d”,i); fclose(fp); fp=fopen(“d1.dat”,”r”); fscanf(fp,”%d%d”,&k,&
[单选题]有以下程序: 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",);
[单选题]有以下程序 include main( ) { FILE *fp;int i,a[6]={1,2,3,4,5,6}; fp=fopen("d3.da有以下程序#include <stdio.h>main( ){ FILE *fp;int i,a[6]={1,2,3,4,5,6};fp=fopen("d3.dat","w+b");fwrite(a,sizeof(int),6,fp);fseek(fp,sizeof(int)*3,SEEK_SET);/*该语句使读文件的位置指针从文件头向
[单选题]有以下程序 include main() { FILE *fp;int i,a[6]={1,2,3,4,5,6}; fp=有以下程序 #include<stdio.h> main() { FILE *fp;int i,a[6]={1,2,3,4,5,6}; fp=fopen("d3.dat","w+b"); fwrite(a.sizeof(int),6,fp); fseek(fp,sizeof(int)*3,SEEK_SET):/*该语句使读文件的位置指针从文件头向后移动3个int型数据