首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
专升本
若有定义:float w;int a,b;则合法的switch语句是( )。
若有定义:float w;int a,b;则合法的switch语句是( )。
admin
2014-10-20
23
问题
若有定义:float w;int a,b;则合法的switch语句是( )。
选项
A、switch(w)
B、switch(a);
{case 1.0:printf(“*\n”); {case 1 printf(“*\n”);
case 2.0:printf(“**\n”);case 2 printf(“**\n”);
}}
C、switch(b)
D、switch(a+b);
{case 1:printf(“*\n”);{case 1:printf(“*\n”);
default:printf(“\n”);case 2:printf(“**\n”);
case 1+2:printf(“**\n”);default:printf(“\n”);
}}
答案
C
解析
A项switch后面的表达式不能为浮点型表达式,一般为整型或字符型。B、D,switch后面有;不满足switch的规则。只有C,default可以在case前也可以在其后,故选C。
转载请注明原文地址:https://kaotiyun.com/show/EuvR777K
本试题收录于:
计算机科学与技术题库普高专升本分类
0
计算机科学与技术
普高专升本
相关试题推荐
急性阑尾炎腹痛起始于上腹或脐周的原因是()。
大量不保留灌肠肛管插入的长度是()。
钢筋混凝土矩形偏心受压构件,截面尺寸为b×h=300×550mm,计算长度ι0=2.5m。承受轴向力组合设计值Nd=600kN,柱两端的弯矩组合设计值分别为M1=588kN.m,M2=980kN.m。拟采用C25混凝土,纵向钢筋为HRB335,结构重要
齐次线性微分方程y’’—3y’-10y=0的通解为__________.
下图所示结构单元固端弯矩列阵为|F0|①=[-4,4]T,|F0|②=[-9,9]T,则等效节点荷载为()
tRNA3’-末端的碱基序列是:()
可识别DNA特异序列,并在识别位点或其周围切割双链DNA的一类酶称为()
已知散列表地址空间为HT[0..8],散列函数为H(key)=key%7,采用线性探测法处理冲突,将数据序列{107,27,28,42,3,25,99,38}依次存入散列表中。试画出相应的散列表;并计算等概率下搜索成功的平均搜索长度。散列表及其查找各关键字
深度为k的二叉树其结点数最多有_______个结点。
下列程序判断字符串s是否对称,对称则返回1,否则返回0;如f(”abba”)返回1,f(”abab”)返回0;intf(_______){inti=0,j=0;while(s[j]);for(j一一;i
随机试题
惊厥性全身性癫痫持续状态静脉注射苯妥英钠时,每分钟注射速度不应大于
各位领导、老师,先生、女士们:大家假期好!通过与师范大学教育学院领导几次沟通、研究,我们如期举办了这次教育教学理论培训活动,我代表主办方诚挚欢迎来自我们地区各所学校的名优教师前来倾听专家的讲座。希望通过我们的鼎力相助,大家抓住机遇,提高理论素养
腰痛兼见寒湿者,可配穴为
经审批可以在大众传播媒介进行广告宣传的是不需要凭执业医师或执业助理医师处方即可自行判断,购买和使用的是
我国非技术劳动力的影子工资换算系数在()之间。
背景材料: 某公路一级施工企业进行某高速公路合同段的施工。在其编制的施工组织设计中包括施工平面布置图,从图中反映了该工程的以下内容: (1)原有地形和地貌; (2)沿线的生产、行政、生活等区域的规划及其设施; (3)沿线的便道、便桥及其他
世界贸易组织的决策可分为协商一致决策和投票决策两种形式。()
商业银行应对理财顾问服务和综合理财服务制定相同的管理规章制度。()
TheWarsofRoseswasendedby______whodestroyedtheforcesofthetwosidesofthewars,andthefeudalbasisofsocietywasc
HowtoBuildTeamSpiritandGetBestSalesPerformanceA)Itisawell-knownfactthatanorganisationcanachieveagreatersuc
最新回复
(
0
)