首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有如下程序: #include<iostream> using namespace std; class Base{ int x; public: Base(int n=0):x(n){cout<<n;} int
有如下程序: #include<iostream> using namespace std; class Base{ int x; public: Base(int n=0):x(n){cout<<n;} int
admin
2013-02-27
40
问题
有如下程序: #include<iostream> using namespace std; class Base{ int x; public: Base(int n=0):x(n){cout<<n;} int getX( )const{return x;} }; class Derived:public Base{ int y; public: Derived(int m,int n):y(m),Base(n){tout<<m;} Derived(int m):y(m){cout<<m;} }; int main( ){ Derived dl(3),d2(5,7); return 0; } 程序的输出结果是
选项
A、375
B、357
C、0375
D、0357
答案
C
解析
有如下程序: #include<iostream> using namespace std; class Base{ int x; public: Base(int n=0):x(n){cout<<n;} int getX( )const{return x;} }; class Derived:public Base{ int y; public: Derived(int m,int n):y(m),Base(n){tout<<m;} Derived(int m):y(m){cout<<m;} }; int main( ){ Derived dl(3),d2(5,7); return 0; } 程序的输出结果是
转载请注明原文地址:https://kaotiyun.com/show/0qVp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
下面不属于结构化程序设计原则的是()。
有下列程序 #include<stdio.h> main() {FILE*fp; inti,a[6]={1,2,3,4,5,6}; fp=fopen("d.dat","w+b"); for(i=5;i>=0;i--)
有下列程序 #include<stdio.h> main() { charv[5][10]={"efg","abcd","snopq","hijkl","xyz"}; printf("%s,%c,%s,%c,%s",*v,**(v+3)
有下列程序 #include<stdio.h> main() { inti,j=0; chara[]="ab1b23c4d56ef7gh89i9j64k",b[100]; for(i=0;a[i];i++) if(a[i
某完全二叉树有256个结点,则该二叉树的深度为()。
下列叙述中正确的是()。
设有如下三个关系表:下列操作中正确的是()。
数据库应用系统中的核心问题是()。
设数据元素的集合D={1,2,3,4,5},则满足下列关系R的数据结构中为线性结构的是()。
随机试题
AnoldIndianstorysaysthatthegameofchess(国际象棋)wasinventedbySissaBen,PrimeMinisterofKingShirham.Assoonasthe
Ⅱ型呼吸衰竭应给予吸氧的浓J蔓是
63岁妇女出现血性白带,除生殖系统恶性肿瘤外,考虑有哪些疾病可能
怀疑再生障碍性贫血的老年患者行穿刺的最佳部位是
A.大黄B.火麻仁C.京大戟D.巴豆E.芫花治疗寒积便秘,宜用()
某公司从一家跨国公司购进一套生产速溶咖啡的技术资料,因技术力量薄弱,无法生产出合格产品,遂与某科技大学签订技术合同,约定由该公司提供技术开发所需科研经费,付酬10万元,并派5名技校毕业生协助参与开发工作,主要是整理资料,购买器材等,但对开发出的成果如何申请
素质教育是指一种以提高受教育者诸方面素质为目标的教育模式,它重视人的()。
根据以下资料。回答下列题。2011年,我国能源生产总量达到31.8亿吨标准煤,是世界第一大能源生产国。其中,原煤产量35.2亿吨,原油产量稳定在2亿吨,成品油产量2.7亿吨。天然气产量快速增长,达到1031亿立方米。电力装机容量10.6亿千瓦。年
______foreverarethedays______Iwasyoung.
Splittingdinnercheckscancauseasplittingheadache,evenwhenthedinersaremathematicsmajors.Threecomputerscience【B1】_
最新回复
(
0
)