首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下列程序的输出结果是( )。 #include<iostream.h> main() { int m=5; if(m++>5) cout<<m; else cout<<m--; }
下列程序的输出结果是( )。 #include<iostream.h> main() { int m=5; if(m++>5) cout<<m; else cout<<m--; }
admin
2013-02-27
16
问题
下列程序的输出结果是( )。 #include<iostream.h> main() { int m=5; if(m++>5) cout<<m; else cout<<m--; }
选项
A、7
B、6
C、5
D、4
答案
B
解析
此题中,因为m++>5成立(此时m的值变为6),所以执行语句cout<<m;输出结果为6。
转载请注明原文地址:https://kaotiyun.com/show/iZVp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
下列叙述中正确的是()。
对软件系统总体结构图,下列描述中错误的是()。
以下关于C语言的叙述中正确的是()。
若有定义,inta=3,*p=&a,**q=&p;,则以下叙述中错误的是()。
分时操作系统不具备的特点是()。
以下程序段中,与语句k=a>b?(b>c?1:0):0;功能相同的是()。
数据库系统的数据独立性是指()。
以下关于C语言文件系统的叙述中正确的是()。
在计算机中,运算器的基本功能是()。
【】是C++语言程序的入口。
随机试题
为了防止陶质衬垫对接CO2气体保护半自动焊产生收弧缩孔,可采取的方法是()。
由探测器接收到信号后,经A/D转换后得到的数据称为
询问汗的有无,可以判断感受外邪的性质和卫阳盛衰,表证有汗常见于
计算计时工资的原始记录有()。
甲、乙结婚后购得房屋一套,仅以甲的名义进行了房屋产权登记。后来甲、乙感情不和,甲擅自将该房屋以市场价格出售给不知情的丙,并办理了房屋所有权转移登记。根据物权法律制度的规定,下列说法正确的是()。
在无人的沙漠里有一棵千年古树,它一直顽强地生长着。一位好心的游客为它浇了一瓶矿泉水,结果古树过了一星期就死了。这个故事给你什么启发?
Allflights______becauseofthesnowstorm,manypassengerscoulddonothingbuttakethetrain.
在考生文件夹下打开EXCEL.XLSX文件将sheet1工作表的A1:E1单元格合并为一个单元格,水平对齐方式设置为居中;计算总计行的内容和平均值列(“总计”行不计,数值格式保留两位小数),将工作表命名为“空调销售情况表”。
Accordingtothispassage,womenovertheageof______arethemostaffectedbyretirement.
Eatingtoomuchfat______toheartdiseaseandcausehighbloodpressure.
最新回复
(
0
)