首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有如下程序: #include" iostream.h" void main() { int x=1, a=0, b=0; switch(x) { case O:b++; easel:a++;
有如下程序: #include" iostream.h" void main() { int x=1, a=0, b=0; switch(x) { case O:b++; easel:a++;
admin
2010-06-06
28
问题
有如下程序: #include" iostream.h" void main() { int x=1, a=0, b=0; switch(x) { case O:b++; easel:a++; case2:a++:b++: } cout<<"a ="<<a<<"," <<"b="<<b; } 该程序的输出结果是( )。
选项
A、a=2,b=1
B、a=l, b=1
C、a=1,b=0
D、a=2,b=2
答案
1
解析
转载请注明原文地址:https://kaotiyun.com/show/U0jp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
设栈的存储空间为S(1:50),初始状态为top=51。现经过一系列正常的入栈与退栈操作后,top=20,则栈中的元素个数为()。
下列关于线性表的叙述中,不正确的是()。
某系统总体结构图如下图所示:该系统总体结构图的深度是()。
若有定义inta[5],*p=a;则正确引用数组元素的是()。
下列选项中可作为C语言合法常量的是()。
已知一个文件中存放若干工人档案记录,其数据结构如下:structa{charnumber[100];intage;floatp[6];};定义一个数组:structanumber[10];
C语言中允许用外部说明来指定变量、函数和其他标识符的特征,这里所说的外部指的是()。
由N个有序整数组成的数列已放在一维数组中,给定程序MODIl.C中函数fun的功能是:利用折半查找算法查找整数m在数组中的位置。若找到,返回其下标值;反之,返回-1。折半查找的基本算法是:每次查找前先确定数组中待查的范围:low和high(10w
C语言中的标识符分为关键字、预定义标识符和用户标识符,以下叙述正确的是
设有表示学生选课的三张表,学生S(学号,姓名,性别,年龄,身份证号),课程C(课号,课名),选课SC(学号,课号,成绩),则表SC的关键字(键或码)为()。
随机试题
若要求:当数学式3<x<7成立时,使得y=1,且设x、y为int型变量,则以下能够实现这一要求的选项是()。
第一心音减弱不常见于
调整产业结构、转变增长方式的中心环节是()。
王某2006年取得特许权使用费两次,一次收入为3000元,另一次收入为4500元。王某两次特许权使用费所得应纳的个人所得税税额为( )元。
企业采用不附加追索权的应收账款转让方式筹资时,如果应收账款发生坏账,其坏账风险必须由本企业承担。()
学生掌握数的概念时,把数分为实数和虚数,又把实数分为有理数和无理数,有理数又可分为整数、小数和分数等属于()。
人性化的公共行政服务,不能依赖于具体公务人员的道德品行;改变传统的行政思维,也难以通过一纸通知就顺利实现。现代公共行政领域之宽泛、基层服务部门之繁杂、公务执法人员素质之不均,表明普遍意义上的服务行政很难通过简单的方式实现,持久性的效应必须确立在稳定的制度基
中科院大气物理研究所在传统的天气预报计算模式中引入了沙源地的地表因素,包括沙粒大小、地表湿度、地表植被和积雪覆盖等,研制了“嵌套网络空气品质实时预报系统”,即沙尘暴预报系统,实现了沙尘暴的精确数值预报。对上述文段主要信息的提炼,最恰当的一项是()。
IntheUnitedStates,bothpublicandprivateuniversitiesdependonthefollowingsourcesofincomeexcept______.
AsachildIwastaughttowalkwithmyheadup,my【C1】______backandmyeyeslookingstraight【C2】______Iwastolditwasgood
最新回复
(
0
)