首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
阅读下列程序: #include<iostream.h> void main() { int i,row=0,column=0,min; static int a[3][3]={100,28,72,-30,
阅读下列程序: #include<iostream.h> void main() { int i,row=0,column=0,min; static int a[3][3]={100,28,72,-30,
admin
2010-12-16
37
问题
阅读下列程序: #include<iostream.h> void main() { int i,row=0,column=0,min; static int a[3][3]={100,28,72,-30,2,•100}; min=a[0][0]; for(i=0;i<3;i++) for(j=0;j<3;j++) if(a
[j]<min) { min=a
[j];
选项
A、-100,2,3
B、-100,1,2
C、100,1,1
D、100,0,0
答案
B
解析
该程序是找到数组a中的最小值,然后输出其数值及行、列。首先将min的值赋值为a中的第一行第一列的数值。然后在for两层循环中利用if语句进行大小比较,求出数组最小值,即-100。它的位置为第二行,第三列。标识由0开始计数,所以是1,2。
转载请注明原文地址:https://kaotiyun.com/show/9oVp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
有下列程序:main(){intm,n,p;scanf("m=%dn=%dp=%d",&m,&n,&p);printf("0%d%d%d\n",m,n,p);}若想从键盘上输入数据,使变量m中的值为123
下列给定程序中函数fun的功能是:用冒泡法埘6个字符串按m4,到大的顺序进行排序。请改止程序中的错误,使它能得出正确的结果。注意:不要改动main函数,不得增行或删行,也不得更改程序的结构!试题程序:#include<stdli
有以下程序:#includeintg(inta){intb=2;staticintc=2;b++;c--;return(a+b+c);}main(){intk,a=5;for(k=0;k<3;k++)printf(’’%d’’,
设Y为整型变量,A=1,A的地址为EF01;B=2,B的地址为EF02;执行语句B=&A;Y=&B;后Y的值()。
下列关于C语言数据文件的叙述中正确的是()。
以下叙述中错误的是( )。
有以下定义structperson{charname[10];intage;};structpersonclass[10]={"Johu",17,
结构化程序的三种基本控制结构是()。
以下不构成无限循环的语句或语句组是()。
数据独立性是数据库技术的重要特点之一。所谓数据独立性是指()。
随机试题
碳钢和铸铁都是铁和碳的合金,它们的主要区别是含()量不同。
生产资料包括()。
A、雄激素B、孕激素C、小剂量缩宫素D、儿茶酚胺E、雌激素使子宫对缩宫素敏感
下列不属于优先股的主要特征的是( )。
关于程序模块优化的启发式规则有若干条,以下规则中不符合优化原则的是(55)。如果一个模块调用下层模块时传递一个数据结构,则这种耦合属于(56)。
【T1】Inafamilywheretherolesofmenandwomenarenotsharplyseparatedandwheremanyhouseholdtasksaresharedtoagreate
ReadthearticlebelowaboutFederalDepositInsuranceCorporation.Choosethebestwordtofilleachgap,fromA,B,CorD.Fo
Normally,atthebeginningoftheschoolyear,theStudentServicesofuniversitiesandcollegespublishlistsofroomsandapar
Itisno(use)______arguingaboutit,becausehewillneverchangehismind.
PartⅡReadingComprehension(SkimmingandScanning)Directions:Inthispart,youwillhave15minutestogooverthepassageq
最新回复
(
0
)