首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
阅读下面程序: #include fun(int a’int b) {int c; c=a+b: return c; } void main0 {int x=6,y=7,z=8,r;
阅读下面程序: #include fun(int a’int b) {int c; c=a+b: return c; } void main0 {int x=6,y=7,z=8,r;
admin
2019-04-18
28
问题
阅读下面程序:
#include
fun(int a’int b)
{int c;
c=a+b:
return c;
}
void main0
{int x=6,y=7,z=8,r;
r=fun((x一,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/fZAp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
下列关于模板的叙述中,错误的是
下列关于类定义的叙述中,正确的是
队列是限定在表的一端进行插入和在另一端进行删除操作的线性表。允许插入的一端称作______。
在关系数据库中,用来表示实体之间联系的是______
下列叙述中,不符合良好程序设计风格要求的是
下列关于栈的叙述中,正确的选项是()
关于结构化程序设计原则和方法的描述错误的是()
算法的空间复杂度是指()
下列选项中,与实现运行时多态性无关的是
随机试题
下列______是WindowsXP操作系统的默认用户。
从逻辑功能上来划分,可以把计算机网络划分为________。
A.肠碱性环境灭活B.遇胃酸失活C.被消化液分解D.在消化道吸收差E.在肝脏快速分解毒毛花苷K不能口服的原因
A.叠连B.凝集C.粘连D.聚集E.凝固血液由溶胶状态变为凝胶状态称为
钢结构涂装后4h内,应加以保护,使其免受()。
以下关于个人质押贷款期限表述不正确的是()。
服务对象反复恳求社会工作者代替他们做决定,社会工作者遇到的这个问题是()。
道德教育的认知模式是现代教育理论中流行最为广泛、占据主导地位的教育学说。()
RarelyhavetheChristmasresultsforBritain’ssupermarketsbeenawaitedwithsuchanxiety.Mostofthem,especiallythemarke
Inthe1960stheWestCoastbecameanimportantcenterforrockmusic.LosAngelesandSouthernCaliforniaarefamousforsunshi
最新回复
(
0
)