首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有如下程序段: int i=5; while(int i=0){cout<<’*’;i--;} 运行时输出’’*’’的个数是( )。
有如下程序段: int i=5; while(int i=0){cout<<’*’;i--;} 运行时输出’’*’’的个数是( )。
admin
2017-04-25
31
问题
有如下程序段:
int i=5;
while(int i=0){cout<<’*’;i--;}
运行时输出’’*’’的个数是( )。
选项
A、0
B、1
C、5
D、无穷
答案
A
解析
因为while循环中,因为i的值等于0,所以while循环体一次也不执行。因而运行时输出“*”的个数是0。
转载请注明原文地址:https://kaotiyun.com/show/51Ap777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
下列数据结构中,插入时不需要移动其他元素的是
下列类定义中包含了构造函数和拷贝构造函数的原型声明,请在横线处填写正确的内容,使拷贝构造函数的声明完整。class myClass{private:intdata;public:myClass(in
请将下列类定义补充完整。classBase(public:voidfun(){cout<<"Base::fun"<<end1;}};classDerived:publicBase{public:voi
有如下程序: #include<iostream> using namespace std; int main() { void function(double val); double val; fu
执行下列语句序列: int i=0;while(i<25)i+=3;cout<<i; 输出结果是( )。
以下程序的正确运行结果是()。#include<iostream.h>intf(int);voidmain(){inta=2,i;for(i=0;i<3;i++)cout<<f(a)<<"";
下列关于模板的叙述中,错误的是
类classone在声明func成员函数时发生错误,出错原因是【 】。Classone{private:inta;
下列运算符中,在C++语言中不能重载的是( )。
在下列关系运算中,可能改变关系中属性个数的是
随机试题
下列属于输入设备的是
下列对蛋白质的含氮量的叙述正确的是()。
妊娠高血压综合征患者血液呈高凝状态,即使水肿明显,也不适合用利尿剂。()
二次灌浆时,当灌浆层要求与设备底座底面接触较密实时,宜采用()灌浆。
从股东的角度看,在公司全部资本利润率超过因借款而支付的利息率时,( )。
甲公司适用的所得税税率为25%,因销售产品承诺提供3年的保修服务,2017年年末“预计负债”科目余额为500万元,“递延所得税资产”科目余额为125万元。甲公司2018年实际发生保修费用400万元,在2018年度利润表中确认了600万元的销售费用,同时确认
依次填入下列各句横线处的词语,恰当的一组是()。(1)天空的使者——鸟,也会教给那些留心________它们的人许多本领。(2)我一直________于科学世界的优美之中,我所热爱的科学不断地显现出它崭新的远景。
Curiously,forapublicationcalledanewspaper,noonehasevercoinedastandarddefinitionofnews.Butforthemostpart,ne
ShoppinghabitsintheUnitedStateshavechangedgreatlyinthelastquarterofthe20thcentury.【C1】______inthe1900smostAm
办公室自动化(OA)是计算机的一大应用领域,按计算机应用的分类,它属于()。
最新回复
(
0
)