首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
若a是float型变量,且a=6,则表达式“a/2+(int)(a+1)%2”的值为【 】。
若a是float型变量,且a=6,则表达式“a/2+(int)(a+1)%2”的值为【 】。
admin
2009-05-20
36
问题
若a是float型变量,且a=6,则表达式“a/2+(int)(a+1)%2”的值为【 】。
选项
答案
4
解析
a/2的值为3,表达式(int)(a+1)%2的值为1,所以最后结果为4。
转载请注明原文地址:https://kaotiyun.com/show/vM5p777K
本试题收录于:
二级Access题库NCRE全国计算机二级分类
0
二级Access
NCRE全国计算机二级
相关试题推荐
有如下程序:#includeUsingnamespacestd;classBase{public:Base(intx=0):valB(x){cout
若x和y是程序中的两个整型变量,则下列if语句中合法的是
若目前E盘根目录下不存在data.txt文件,则下列打开文件方式不会自动创建data.txt文件的是
请打开考生文件夹下的解决方案文件proj3,其中定义了MyString类,一个用于表示字符串的类。成员函数reverse的功能是将字符串进行“反转”。例如,将字符串ABCDEF“反转”后,得到字符串FEDCBA;将字符串ABCDEFG“反转”后,得到字符串
下列链表中,其逻辑结构属于非线性结构的是
下列选项中,正确的C++表达式是()。
算法的空间复杂度是指()。
若目前D盘根目录下并不存在test.txt文件,则下列打开文件方式不会自动创建test.txt文件的是()。
请使用菜单命令或直接用VC6打开考生文件夹下的工程prj03。请完善下列程序,实现一个Number类。Add函数计算2个Number类对象之和,并将和作为Number对象返回。这2个Number对象中各包含一个用字符串表示的10进制正整数,均不超过int的
宏命令Requery的功能是()。
随机试题
对如题34表所表示的运输方案,(1)若要总运费最少,该方案是否为最优方案?(2)在问题中,若将各空格的单位运费设为CXC=u,CYB=b,CZA=m,CZC=n,要使方案成为最优方案a,b,m,n,最小应取何值?
A、exhibitionB、honorC、horrorD、honestC画线部分读[h],其他选项的画线部分不发音。
以下不属于医院感染的是
最可能的诊断为上述患儿最典型的心电图改变是哪一种
【2012年第81题】某钢筋混凝土框架—核心筒结构,若其水平位移不能满足规范限值,为加其侧向刚度,下列做法错误的是:
相邻的无支护基坑深浅不等时,一般采用()的开挖施工顺序。
A公司为支付货款,向B公司签发了一张金额为200万元的银行承兑汇票,某商业银行作为承兑人在票面上签章。B公司收到汇票后将其背书转让给C公司,以偿还所欠C公司的租金.但未在被背书人栏内记载C公司的名称。C公司欠D公司一笔应付账款,遂直接将D公司记载为B公司的
现有5件产品,其中有1件不合格品。现从中随机抽取2件检查,则其中没有不合格品的概率为()。
To:TedMunsonFrom:SylviaCheng,ApexOfficeInc.Subject:YourorderDearMr.Munson,Thise-mailistoupdateyouonthesta
Kunmingisusuallycoolinthesummer,butShanghai_____.
最新回复
(
0
)