有以下程序includemain(){FILE *fp;int i,k=0,n=0; fp=fopen("d1.dat","w"); for(i=1; 有以下程序 #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,n);printf("%d%d\n",k,n); fclose(fp); } 执行后输出结果是A.1 2B.123 0C.1 23D.0 0

有以下程序includemain(){FILE *fp;int i,k=0,n=0; fp=fopen("d1.dat","w"); for(i=1;

有以下程序 #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,&n);printf("%d%d\n",k,n); fclose(fp); } 执行后输出结果是

A.1 2

B.123 0

C.1 23

D.0 0


相关考题:

有以下程序#include stdio.hmain(){ 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.hmain(){ FILE*fp; int i,k=0,n=0; fp=fopen("d1.dat","wb+"); for(i=1;i4;i++) fprintf(fp,"%d",i); fclose(fp); fp=fopen("d1.dat","r");fseek(fp,1L,SEEK_SET); fscanf(fp,"%d%d",k,n); printf("%d%d\n",k,n); fclose(fp);}执行后输出结果是( )。A.1 2 B.123 0 C.1 23 D.230

有以下程序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 *fp;int i=20,j=30,k,n;fp=fopen("D1v.dat","w");fprin 有以下程序 #include<stdio.h> main() {FILE *fp;int i=20,j=30,k,n; fp=fopen("D1v.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

有以下程序:includemain(){FILE *fp;int i,k=0,n=0;fp=fopen("d1.dat","w");for(i=1;i 有以下程序: #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,n); printf("%d %d\n", k,n); fclose(fp); } 执行后输出结果是( )。A.1 2B.123 0C.1 23D.0 0

有下列程序: 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"); fscanf(fp,"%d",n); fclose(fp); prinff("%d\n",n); 程序的运行结果是( )。A.12300B.123C.1D.321

有以下程序#include stdio.hmain(){ FILE *fp; int a[10]={1,2,3},i,n;fp=fopen("d1.dat","w");for(i=0;i3;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*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' a[10]={1,2,3,0,0},i; 有以下程序 #include <stdio.h> main() { FILE *fp; int' a[10]={1,2,3,0,0},i; fp = fopen("d2.dat", "wb"); fwrite(a, sizeof(int), 5, fp); fwrite(a, sizeof(int), 5, fp); fclose(fp); fp = fopenCd2.dat", "rb"); fread(a, sizeof(int), 10, fp); fclose(fp); for (i=0; i<10; i++) printf("%d,", a[i]); }A.1,2,3,0,0,0,0,0,0,0,B.1,2,3,1,2,3,0,0,0,0,C.123,0,0,0,0,123,0,0,0,0,D.1,2,3,0,0,1,2,3,0,0,

有以下程序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 *fp; int i,k=0,n=0;fp=fopen("d1.dat","w");for(i=l 有以下程序: #include <stdio.h> main() FILE *fp; int i, k=0, n=0; fp=fopen("d1.dat","w"); for(i=l;i<4;i++) fprintf(fp,"%d",i); fclose(fp); fp=fopen("d1.dat","r"); fscanf(fp,'%d%d",k,n); printf("%d %d\n", k, n); fclose(fp); 执行后输出结果是A.1 2B.123 0C.1 23D.0 0

有以下程序include main(){FILE*fp;inti,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 ",1); 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

有以下程序:includemain(){FILE*fp;int i,k=0,n=0; fp=fopen("d1.dat","w"); for(i=1; 有以下程序: #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,n);printf("%d%d\n",k,n); fclose(fp); { 执行后的输出结果是( )。A.1 2B.123 0C.1 23D.0 0

有以下程序: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

有以下程序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

有以下程序includemain(){FILE *fp;int i=20,j=30,k,n;fp=fopen("d1.dat","w");fprint 有以下程序 #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

有以下程序 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,n); printf(“%d %d\n”,k,n); fclose(fp);} 执行后输出结果是( )A.1 2B.123 0C.1 23D.0 0

有以下程序:includemain(){ FILE*fp;int i;char ch[]="abcd",t;fp=fopen("abc.dat","w 有以下程序: #include <stdio.h> main() { FILE *fp; int i; char ch[]="abcd",t; fp=fopen("abc.dat","wb+"); for(i=0;i<4;i++)fwrite(ch[i]1,1,fp); fseck(fp,-2L,SEEK_END) ; fread(t,1,1,fp); felose(fp); printf("%c\n",t); } 程序执行后的输出结果是( )。A.dB.cC.bD.a

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

有以下程序:includemain(){FILE *fp;int i,a[6]={1,2,3,4,5,6};fp=fopen("d2.dat","w" 有以下程序: #include<stdio.h> main() {FILE *fp;int i,a[6]={1,2,3,4,5,6}; fp=fopen("d2.dat","w"); fprintf(fp,"%d%d%d\n",a[0],a[1],a[2]); fprintf(fp,"%d%d%d\n",a[3],a[4],a[5]); fclose(fp); fp=fopen("d2.dat","r"); fscanf(fp,"%d%d\n",k,A.1 2B.1 4C.123 4D.123 456

有以下程序:include main(){FILE *fp;int i,k=0, n=0; fp=fopen("d1.dat","w"); for(i 有以下程序: #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,n); printf("%d%d\n",k,n); fclose(fp); } 执行后输出结果是( )。A.1 2B.123 0C.1 23D.0 0

有以下程序: 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(){FLLE *fp;int i=20,j=30,k,n;fp=fopen("d1.dat""w");fprin 有以下程序: #include <stdio.h> main() {FLLE *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.dar","r"); fp=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 *fp; int a[10]={1,2,3},i,n; fp=fopen(d1.dat,w); for(i=0;i3;i++) fprintf(fp,%d,a[i]); fprintf(fp,); fclose(fp); fp=fopen(d1.dat,r); fscanf(fp,%d,n); fclose(fp); printf(%d,n);}程序的运行结果是(  )。A12300B123C1D321

单选题有以下程序:#include main(){ FILE *fp; int k,n,i,a[6]={1,2,3,4,5,6}; fp=fopen(d2.dat,w); for(i=0;i6;i++) fprintf(fp,%d,a[i]); fclose(fp); fp=fopen(d2.dat,r); for(i=0;i3;i++) fscanf(fp,%d%d,k,n); fclose(fp); printf(%d,%d,k,n);}程序运行后的输出结果是(  )。A1,2B3,4C5,6D123,456

单选题有以下程序:#include main(){ FILE *fp; int i,a[6]={1,2,3,4,5,6},k; fp=fopen(data.dat,w+b); fwrite(a[0],sizeof(int),1,fp); for(i = 1;i 6;i++) {  fseek(fp,0L,0);  fread(k,sizeof(int),1,fp);  fseek(fp,0L,0);  a[i]+=k;  fwrite(a[i],sizeof(int),1,fp); } rewind(fp); fread(k,sizeof(int),1,fp); fclose(fp); printf(%d,k);}程序的运行结果是(  )。A21B6C123456D11