首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
阅读下面程序: #include<iostream.h> fun(int a,int B. {int c; c=a+b: return C; } void main() {int x=6,y=
阅读下面程序: #include<iostream.h> fun(int a,int B. {int c; c=a+b: return C; } void main() {int x=6,y=
admin
2019-06-12
46
问题
阅读下面程序:
#include<iostream.h>
fun(int a,int B.
{int c;
c=a+b:
return C;
}
void main()
{int x=6,y=7,z=8,r;
r=fun((x--,y++,x+y),z--);
cout<<r<<end1;
}
则该程序的输出结果是( )。
选项
A、11
B、20
C、21
D、31
答案
C
解析
由主函数入手,定义变量x、y、z,然后调用函数fun,其中的参数为(x--,y++,x+y)的计算结果和z--的计算结果,所以调用fun(13,8)计算结果为21。
转载请注明原文地址:https://jikaoti.com/ti/4mA0FFFM
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
下面关于友元的说法中错误的是()。
已知:intn=1:在下面定义引用的语句中,正确的是()。
Staff类含有int型数据成员ID,两个Staff象相等是指它们的ID相同。下面的函数重载了运算符“==”,它用来判断两个Staff对象是否相等,相等时返回true,否则返回false。请将横线处缺失部分补充完整。boolStaff::St
在关系代数运算中,_____________操作会消去关系中的某些列并删去重复的元组。
以下程序的执行结果为()。#includeclassSample{intn;public:Sample(inti){n=i;}operator++(){n
有如下程序:#includeusingnamespacestd;voidfun(int&x,inty){intt=x;x=y;y=t;}immain(){inta[2]={1,2}
队列是限定在表的一端进行插入和在另一端进行删除操作的线性表。允许插入的一端称作_____________。
在数据库系统的组织结构中,下列()映射把用户数据库与概念数据库联系了起来。
下列运算符中不能在C++中重载的是()。
当执以下程序段时,循环体将执行(),main(){inty=1;do{y--;}while(--y):}
随机试题
在组织的运行过程中,遇到冲突或问题时,管理者必须善于处理冲突和解决问题,这时管理者扮演的角色是()
反映肾小管功能的试验为
张某拟为其妻王某投保以死亡为给付条件的人寿险,以下说法不正确的是:()
电焊机二次线可采用()。
在环境影响报告书中的附录和附件中,将建设项目()等必要的有关文件、资料附在环境影响报告书后。
第二类危险源包括()。
下列各项税金中,可能列入“主营业务税金及附加”科目核算的有()。
《中华人民共和国义务教育法》属于()
在夏夜星空的某一区域,有七颗明亮的星星:A星、B星、c星、D星、E星、F星、G星。它们由北至南排列成一条直线,同时发现:(1)c星与E星相邻。(2)B星和F星相邻。(3)F星与C星相邻。(4)G星与位于最南侧的那颗星
Borrowingtostartabusinessisnoteasy.Gettingabankloan,particularlyforanewsmallbusiness,islikegoingthroughthe
最新回复
(
0
)