首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下列程序运行后的结果为( )。 #include void main() { int a=1,b=2; bool c=1: if
下列程序运行后的结果为( )。 #include void main() { int a=1,b=2; bool c=1: if
admin
2021-07-02
22
问题
下列程序运行后的结果为( )。
#include
void main()
{
int a=1,b=2;
bool c=1:
if<
b)||c)cout<<"true"<
else
cout<<"false"<
}
选项
A、false
B、true
C、2
D、1
答案
B
解析
本题考查的是对于逻辑运算符号的理解,“||”运算符的任何一边取值为真,则整个运算结果为真。
转载请注明原文地址:https://kaotiyun.com/show/x4fp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
为类Matrix重载下列运算符时,只能作为Matrix类成员函数重载的运算符是()。
下列关于派生类和基类的描述中,正确的是()。
若已经声明了函数原型“voidfun(inta,doubleb=0.0);”,则下列重载函数声明中正确的是()。
有如下程序:#inc1ude<iostream>#inc1ude<cstring>.usingnamespacestd;classXCD{char*a:intb:public:
有如下类定义:classXX{intxdata;public:XX(intn=0):xdata(n){}};classYY:publicXX{intydata;p
在C++中,编译系统自动为一个类生成缺省构造函数的条件是()。
数据字典(DD)所定义的对象都包含于()。
请使用VC6或使用【答题】菜单打开考生文件夹proj3下的工程proj3,其中声明IntSet是一个用于表示正整数集合的类。IntSet的成员函数Intersection的功能是求当前集合与另一个集合的交集。请完成成员函数Intersection。在mai
请打开考生文件夹下的解决方案文件proj3,其中定义了一个字符串变量类StringVar。类成员的说明在程序注释中。请在//********333********和//********666********之间填写StringVar成员函数和友元函数的实现
“商品”与“顾客”两个实体集之间的联系一般是()。
随机试题
影响体质形成的先天因素有
A.雌激素B.雄激素C.孕激素D.人绒毛膜促性腺激素E.黄体生成素
A.白前B.百部C.前胡D.芥子E.桔梗性微寒,既降气祛痰,又宜散风热的药是()。
流体以层流掠过平板时,在x长度内的平均表面传热系数h与x处局部换热系数hx之比h:hx为()。
某建筑场地的土层分布及各土层的剪切波速如题图所示,土层等效剪切波速为240m/s,试问,该建筑场地的类别应为下列()项所示。
建设工程设备采购合同条款规定,卖方应在合同设备启运前和启运后合同规定的时间内预通知和正式通知买方的事项主要包括()。
下面的网络设备中,能够抑制网络风暴的是()。
阅读材料,回答问题:我们的会议之所以称为政治协商会议,是因为三年以前我们曾和蒋介石国民党一道开过一次政治协商会议。那次会议的结果是被蒋介石国民党及其帮凶们破坏了,但是已在人民心中留下了不可磨灭的印象。那次会议证明,和帝国主义的走狗蒋介石国民党及其帮凶们一
Whatistherelationshipbetweenthetwospeakers?
Idislikeitsshapeandcolor,______(最真正吸引我的)itsoriginality.
最新回复
(
0
)