首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有如下程序: #include<iostream> using namespace std; class Base{ int x; public: Base(int n=0):x(n){cout<<n;)
有如下程序: #include<iostream> using namespace std; class Base{ int x; public: Base(int n=0):x(n){cout<<n;)
admin
2009-08-15
19
问题
有如下程序: #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){cout<<m;} Derived(int m):y(m){cout<<m;} }; int main(){ Derived d1(3),d2(5,7) return 0; }运行时的输出结果是
选项
A、375
B、357
C、375
D、357
答案
C
解析
转载请注明原文地址:https://kaotiyun.com/show/DEjp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
表达式:(int)((double)9/2)-9%2的值是()。
有以下程序:#include<stdio.h>intfun(inta,intB){if(b==0)returna;elsereturn(fun(--a,--b));}main(){printf("%d\n",fun(4,2));}
以下关于C语言的叙述中正确的是()。
有以下程序:#include<stdio.h>#defineN4voidfun(inta[][N],intb[])inti:for(i=0:i<N;i++)b[i]=a[i][i];main()int
在软件开发中,需求分析阶段产生的主要文档是()。
有如下程序:#include<stdio.h>voidmain(){intx=0x13;if(x=0x18)printf("T");printf("F\n");}程序运行后的结果是()。
若有定义intx,y;并已正确给变量赋值,则以下选项中与表达式(x-y)?(x++):(y++)中的条件表达式(x-y)等价的是()。
下列工具中,小属于结构化分析的常用二L具的是()。
随机试题
脑桥出血引起格林-巴利综合征引起
粉煤灰的技术指标要求有()。
秘书在工作中不适当地占用了上司的时间,是因为()
课外、校外教育与课堂教学相比更有利于()。
幼儿园环境创设的原则有()。
A、 B、 C、 D、 D第一组图的弧度顺时针依次增大,第二组图也应符合此规律,阴影顺时针依次增加,D项正确。
杨贤江在青年教育中提出了()观点。
设f(x,y)在点(0,0)的邻域内连续,则
Iwasanxiouslyexpectedyourletter,andatlast【M1】______ithasreachedtome.Iamverygladtoknowthat【M2】______everyo
In1915EinsteinmadeatriptoGottingentogivesomelecturesattheinvitationofthemathematicalphysicistDavidHilbert.H
最新回复
(
0
)