网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
有以下程序:程序运行后的输出结果是( )。
A.4,5,6,4,5,6,
B.1,2,3,4,5,6,
C.4,5,6,1,2,3,
D.6,5,4,3,2,1,
参考答案
更多 “ 有以下程序:程序运行后的输出结果是( )。A.4,5,6,4,5,6,B.1,2,3,4,5,6,C.4,5,6,1,2,3,D.6,5,4,3,2,1, ” 相关考题
考题
有以下程序#include stdio.hmain ( ){ 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 型数据 */fread(a,sizeof(int),3,fp); fclose(fp);for(i=0;i6;i++) printf("%d,",a[i]);}程序运行后的输出结果是A)4,5,6,4,5,6,B)1,2,3,4,5,6,C)4,5,6,1,2,3,D)6,5,4,3,2,1,
考题
有以下程序 #include main () {FILE *fp; int i,a[6]={1,2,3,4,5,6k}; fp=fopen(“d3.dat”,”w+b”); fwrite(a,sizeof(int),6,fp); fseek(fp,sizeof(int)*3,SEEK_SET);/*该语句使读文件的位置指针从文件头向后移动3个int型数据*/ fread(a,sizeof(int),3,fp); fclose(fp); for(i=0;i6;i++) printf(“%d,”,a[i]); }程序运行后的输出结果是( )。A.4,5,6,4,5,6,B.1,2,3,4,5,6,C.4,5,6,1,2,3,D.6,5,4,3,2,1,
考题
有以下程序includemain(){FILE*fp;int i,a[6]={1,2,3,4,5,6};fp=fopen("d3.dat","w+b"
有以下程序 #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型数据*/ fread(a,sizeof(int),3,fp);fclose(fp); for(i=0A.4,5,6,4,5,6,B.1,2,3,4,5,6,C.4,5,6,1,2,3,D.6,5,4,3,2,1,
考题
有以下程序 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型数据*/ fread(a,sizeof(int),3,fp);fclose(fp); for(i=0;i<6;i++)printf("%d,",a[i]); } 程序运行后的输出结果是A.4,5,6,4,5,6,B.1,2,3,4,5,6,C.4,5,6,1,2,3,D.6,5,4,3,2,1,
考题
有以下程序#includestdio.hmain(){FILE *fp; int i,a[6]={l,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型数据*/fread(a,sizeof(int),3,fp); fclose(fp);for(i=0;i6;i++)printf("%d,",a[i]);}程序运行后的输出结果是A.4,5,6,4,5,6,B.1,2,3,4,5,6,C.4,5,6,1,2,3,D.6,5,4,3,2,1,
考题
有以下程序 程序运行后的输出结果是( )。A.程序错无输出结果B.31.5C.7.5SXB
有以下程序程序运行后的输出结果是( )。A.程序错无输出结果B.31.5C.7.5D.14.0
考题
有以下程序: #includestdio.h main( ) { FILE*fp; int i,a[6]={1,2,3,4,5,6}; fp=fopen("d2.dat","w+"); for=(i=o;i6;,i++)fpintf(fp,"%d\n",a[i]); rewind(fp); for(i=0;i%6;i++)fscanf(fp,"%d",a[5-i]); fclose(fp); for(i=0;i%6;i++)printf("%d,",a[i]); } 程序运行后的输出结果是( )。A.4,5,6,1,2,3,B.1,2,3,3,2,1,C.1,2,3,4,5,6,D.6,5,4,3,2,1,
考题
有以下程序 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);/*该语句使读文件的位置指针从文件头向后移动3个int型数据*/fread(a,sizeof(int),3,fp);fclose(fp);for(i=0;i<6;i++)printf("%d,",a[i]);}程序运行后的输出结果是A.4,5,6,4,5,6,B.1,2,3,4,5,6,C.4,5,6,1,2,3,D.6,5,4,3,2,1,
考题
有以下程序:includestdio.h main( ){ FILE*fp; int i,a[6]={1,2,3,4,5,6}; fp=fopen(stdio.hmain( ){ FILE*fp; int i,a[6]={1,2,3,4,5,6};fp=fopen(d2.dat,w+);for=(i=o;i6;,i++)fpintf(fp,%d\n,a[i]);rewind(fp);for(i=0;i%6;i++)fscanf(fp,%d,a[5-i]);fclose(fp);for(i=0;i%6;i++)printf(%d,,a[i]);}程序运行后的输出结果是( )。A.4,5,6,1,2,3,B.1,2,3,3,2,1,C.1,2,3,4,5,6,D.6,5,4,3,2,1,
热门标签
最新试卷