首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有如下程序: #include<iostream> using namespace std; int main() { cout.fill(’*’); cout.width (6);
有如下程序: #include<iostream> using namespace std; int main() { cout.fill(’*’); cout.width (6);
admin
2009-01-15
23
问题
有如下程序: #include<iostream> using namespace std; int main() { cout.fill(’*’); cout.width (6); cout.fill(’#’); cout<<123<<end1; return 0; }执行后的输出结果是______ 。
选项
A、###123
B、123###
C、***123
D、123***
答案
1
解析
根据定义,开始设置的coutfill.(‘*’),被后面的cout.fill(‘#’)替代,所以cout的输出结果是###123。
转载请注明原文地址:https://kaotiyun.com/show/yfkp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
有以下程序:#includemain(){intx=5,y=1,t;t=(x<<1)ly;printf(’’%d\n’’,t);}程序运行后的输出结果是()。
面向对象方法中,继承是指
下面描述中不属于软件需求分析阶段任务的是()。
有以下程序#includemain(){FILE*f:f=fopen("filea.txt","w");fprintf(f,"abc");fclose(f);}若文本文件filea.txt中原有内容为:hello,则运行以上程序后,文件f
在一个C源程序文件中所定义的全局变量,其作用域为
对长度为n的线性表排序,在最坏情况下,比较次数不是n(n-1)/2的排序方法是
设变量均已正确定义,若要通过scanf(’’%d%c%d%c’’,&a1,&c1,&a2,&c2);语句为变量a1和a2赋数值10和20,为变量c1和c2赋字符X和Y。下列所示的输入形式中正确的是(注:□代表空格字符)()。
以下程序依次把从终端输入的字符存放到f文件中,用#作为结束输入的标志,则在横线处应填入的选项是#includemain(){FILE*fp;charch;fp=fopen("fname","w");while((ch=get
在满足实体完整性约束的条件下
某棵树中共有25个结点,且只有度为3的结点和叶子结点,其中叶子结点有7个,则该树中度为3的结点数为()。
随机试题
影响企业短期偿债能力的主要因素是
2009年3月在墨西哥出现的新型流感病毒是
一早孕妇女,既往流产2次,现又有点滴阴道流血,除上述哪项外均有助于判断能否再次流产一妇女28岁反复早期流产3次,做哪项检查有助于查明流产原因
渠道在勘测设计阶段的主要测量内容有()等。
在社会主义市场经济条件下,政府职能的范围有()。
根据以下情境材料,回答下列问题。赵某与姜某(文盲)因宅基地纠纷在姜某家中发生争执,赵某殴打姜某,姜某侄子钱某采茶归来路过,打电话报警,赵某又纠缠钱某。邻居杨大爷,辅警黄某闻讯赶来,劝解未果。民警小张等出警,到现场喝止赵某,赵某不听。事后,经鉴定,姜某
抗战初期,毛泽东所著的《论持久战》,极大地鼓舞了全国人民抗战的决心和信心,为中国人民最终夺取抗战胜利起到了巨大的指导作用。这说明()。
高中生思维发展的主要特点是()【江西师范大学2014】
已知3阶矩阵A的逆矩阵为,试求伴随矩阵A*的逆矩阵.
已知A相似于B,即存在可逆阵P,使得P-1AP=B.求证:存在可逆阵Q,使得Q-1AQ=B的充分必要条件是存在与A可交换的可逆阵C,使得Q=CP.
最新回复
(
0
)