首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下列程序的执行结果为 【 】 。 #include<iostream.h> void main( ) { cout.fill(’*’); cout.width(10); cout<
下列程序的执行结果为 【 】 。 #include<iostream.h> void main( ) { cout.fill(’*’); cout.width(10); cout<
admin
2013-05-30
18
问题
下列程序的执行结果为 【 】 。
#include<iostream.h>
void main( )
{
cout.fill(’*’);
cout.width(10);
cout<<"hello"<< end1;
}
选项
答案
*****hello
解析
本题考查的是C++语言的流输出操作,cout中包括的函数fill()和width()分别实现填充和设定显示长度的功能。
转载请注明原文地址:https://kaotiyun.com/show/cGNp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
测试的,目的是暴露错误,评价程序的可靠性;而【】的目的是发现错误的位置并改正错误。
下面程序的输出结果是()。#include<iostream.h>#include"stdng.h"voidmain(){chara[]="welcome",b[]="well";strcpy(a,b)
关于函数重载,下列叙述中错误的是()。
有如下类定义:classMyBase{intk;public:MyBase(intn--0):k(n){}intvalue()const{returnk;}};cla
派生类中所定义的虚函数的【】不影响对它的动态联编,即基类中已定义的虚函数,其同名函数放在派生类中的【】,都可以实现运行时多态性。
磁盘文件操作中,打开文件的访问方式常量中,以追加方式打开文件的是()。
下列关于信息和数据的叙述不正确的是()。
数据库系统与文件系统的最主要区别是()。
随机试题
原始记录的书写要求是什么?当出现记录错误时如何修改?
公共建筑内安全出口和疏散门的净宽度不应小于()m。
A.颌间距离B.垂直距离C.息止颌间隙D.息止颌位E.正中颌位下颌处于正中位时,上下牙槽嵴顶之间的距离称为
振动水冲法适用于处理()素填土和杂填土等地基。
ABC会计师事务所A注册会计师作为关键审计合伙人负责审计甲公司2017年度财务报表。A注册会计师了解到甲公司的以下情况:(1)甲公司为上市公司,所在行业属于食品加工行业,行业整体处于不景气状态,而且商品价格互相降价,竞争非常激烈。(2)甲公司2015年
某次竞赛中,共有20道题,比赛规则为:答对一题得5分,答错一题倒扣3分,某同学作答的最后得分为60分,该同学答对15题。()
某人参加一次趣味竞赛,总共有20道题,第1题为1分,下一题的得分均比上一题多1分。要求必须答对上一道题才能作答下一道,且必须获得60%以上的分数才能获得奖品。问他要想获得奖品,至少要答对多少道题目?()
Fearsof"madcow"diseasespread(1)_____theglobelastweek(2)_____SouthAfrica,NewZealandandSingaporejoiningmostof
SavingNature,ButOnlyManEnvironmentalNecessitiesandEnvironmentalLuxuriesA)Environmentalsensitivityisnowasrequired
A、ItrepresentsWFPandFAO.B、ItrepresentsthetargetofZeroHunger.C、Itrepresentsthegoalweallshare.D、Itrepresentst
最新回复
(
0
)