首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
以下程序的输出结果是( )。 #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
2018-10-21
15
问题
以下程序的输出结果是( )。
#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/KfAp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
有下列程序:#inClude<iostream>usingnamespacestd;c1assA{pubic:virmalvoidfunc1(){cout<<"A1";}vo
有如下函数模板定义:template<classT>Tfunc(Tx,Ty){returnx*x+y*y;}在下列对func的调用中,错误的是()。
以下关于友元函数的叙述不正确的是()。
下列定义中p指向的地址可更改,但*p不能够更改的是()。
C++语言函数中不能由系统自动生成的是
一个关系中属性个数为1时,称此关系为
通常,将软件产品从提出、实现、使用维护到停止使用退役的过程称为______。
数据结构分为逻辑结构和存储结构,循环队列属于______结构。
成本效益分析的目的是从【】角度评价开发一个项目是否可行。
检查软件产品是否符合需求定义的过程称为()。
随机试题
诉的构成三要素是指()
在各种原核基因启动序列特定区域内存在的一些相似序列为在同一DNA链上反向排列的两个互补序列为
室温允许波动范围为±1℃的工艺性空调房间。不应有:(2006。78)
QFII制度是指允许合格的境外机构投资者在一定的规定和限制下汇人一定额度的外汇资金,并转换为当地货币,通过严格监管的专门账户投资当地(),其资本利得、股息等经批准后可转为外汇汇出的一种制度。
资本市场允许银行在流动性短缺时,及时融入昕需资金,而在出现流动性过剩时,又可以及时将资金运用出去,提高营利性。()
1886年落成的自由女神像系()送给美国人民的礼物。
讲解《石钟山记》中“古之人不余欺也”,教师列举其他同类倒装句,帮助学生理解文言句式特点。下列适合的是()。
社会治安秩序包括()。
图A、B、C是一项实验的三种可能结果。试根据图示的结果,回答下列问题:该实验有几个自变量?每个自变量各有几个水平?因变量是什么?
Innovation.It’swhatgotusthroughtheDarkAges.Butovertheyears,insteadofmovingforward,somescientistsandinventors
最新回复
(
0
)