首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
阅读下面程序: #include fun(inta9intb) { int c; c=a+b; return c; } void main() { int x=6,y=7,z=
阅读下面程序: #include fun(inta9intb) { int c; c=a+b; return c; } void main() { int x=6,y=7,z=
admin
2020-06-29
12
问题
阅读下面程序:
#include
fun(inta9intb)
{
int c;
c=a+b;
return c;
}
void main()
{
int x=6,y=7,z=8,r;
r=fun((x--9,y++,x+y),z--);
cout<
}
则该程序的输出结果是( )。
选项
A、11
B、20
C、21
D、31
答案
C
解析
由主函数入手,定义变量x、y、z,然后调用函数fun,其中的参数为(x一,y++,x+y)的计算结果和z一的计算结果,所以调用fun(13,8)计算结果为21。
转载请注明原文地址:https://kaotiyun.com/show/mByp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
下列关于模板的叙述中,错误的是
下列关于函数参数的叙述中,正确的是
下列运算符中,不能被重载的是
在黑盒测试方法中,设计测试用例的主要根据是( )。
下列选项中,不是C++关键字的是
下面属于白盒测试方法的是
数据库设计中反映用户对数据要求的模式是( )。
下面不能作为结构化方法软件需求分析工具的是
层次型、网状型和关系型数据库划分原则是( )。
随机试题
以下药物中可以清热安胎的是
检验检测机构对于口头的形式表达的投诉也应及时处理,可以不记录和归档。
中国香港于:1997年颁布了(),标志着中国香港房地产经纪纳入了法治化管理的轨道。
关于建筑防火分隔的做法,下列选项中不符合规范要求的有()。
甲公司与乙公司均为增值税一般纳税人。甲公司经与乙公司协商,以其拥有的用于经营出租的一幢公寓楼与乙公司持有的可供出售金融资产交换。甲公司的公寓楼符合投资性房地产的定义和确认条件,甲公司对投资性房地产采用成本模式进行后续计量。在交换日,该幢公寓楼的账面原价为8
按茶叶的外形色泽和汤色命名来分类,可将茶叶分为()。
皮亚杰提出儿童的道德发展经历从自律道德阶段到他律道德阶段的发展过程。()
这里不仅仅是旅游胜地,其手工艺品也可以称得上__________,独一无二。填入画横线部分最恰当的一项是()。
coverttranslation
A、Peoplewhorestoreoldhouses.B、Peoplewhosellhouses.C、Peoplewhodesignnewhouses.D、Peoplewhowanttobuyahouse.A
最新回复
(
0
)