首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
以下程序的输出结果是( )。 #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
2016-10-28
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/iONp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
Jackson结构化程序设计方法是英国的M.Jackson提出的,它是一种面向【】的设计方法。
下列描述中错误的是
若已定义的函数有返回值,则以下关于该函数调用的叙述中错误的是
有如下的类模板定义:template<typenameTYPE>classMyClass{TYPEn;public:MyClass(TYPEk);
下列运算符中全都可以被友元函数重载的是
假设线性表的长度为n,则在最坏情况下,冒泡排序需要的比较次数为
在双链表中,每个节点有两个指针域,一个指向前驱节点,另一个指向【】。
一个关系数据库文件中的各条记录()。
在算法正确的前提下,评价一个算法的两个标准是【】。
随机试题
心悸伴发热心悸伴晕厥或抽搐
机动车辆载物应当符合(),严禁超载。
下列关于高层住宅设计特点叙述不正确的是()。
下列表述正确的有()。
将以下5个句子重新排列组合,排列组合最连贯的是()。①《财务管理》一书从计提方法、计提范围、计提数额、比例等方面对“坏账准备”的会计处理与税务处理的异同作了详细的比较。②税法的目的主要是保证国家的财政收入,利用税收杠杆进行宏观调控。③会计制
为了加强对产品质量的监督管理,提高产品质量水平,明确产品质量责任,保护消费者的合法权益,维护社会经济秩序,1993年2月22日我国第七届全国人民代表大会常务委员会第三三十次会议于通过了《中华人民共和国产品质量法》,自1993年9月1日起施行。为了加强质量管
被判处无期徒刑的犯罪分子,适用假释的法定条件之一是()。
表达式Va1(".123E2")的值是()。
•YouwillheartheCEOofAT&Ttellingabouttheachievementsofthecompanyin2003.•Asyoulisten,forquestions1-12,comple
A、Ahomefire.B、Anexplosion.C、Amurder.D、AcaraccidentD从选项内容可猜测题目与某起灾难有关。短文说,RayAnderson目睹卡车司机闯红灯撞了另一辆车,故答案是D。
最新回复
(
0
)