题目内容 (请给出正确答案)
[主观题]

若有以下程序:#include<iostream>using namespace std;class A{private:inta;public:voidseta(in

若有以下程序: #include <iostream> using namespace std; class A { private: int a; public: void seta(int x) { a=x; } void showa() { cout<<a<<","; } }; class B { private: int b; public: void setb (int x) { b=x; } void showb() { cout<<b<<","; } }; class C :public A,private B { private: int c; public: void setc(int x, inc y, int z) { c=z; seta (x); setb (y); } void showc() { showa (); showb (); cout<<c<<end1; } }; int main () { C c; c. setc(1,2,3); c.showc(); return 0; } 程序执行后的输出结果是

A.1,2,3

B.1,1,1

C.2,2,2

D.3,3,3

提问人:网友wmxdjm 发布时间:2022-01-06
参考答案
查看官方参考答案
如搜索结果不匹配,请 联系老师 获取答案
更多“若有以下程序:#include<iostream>using…”相关的问题
第1题
若有以下程序:#include <iost ream>using namespace std;class A{private: int a;public: A(int

若有以下程序: #include <iost ream> using namespace std; class A { private: int a; public: A(int i) { a=i; } void disp () { cout<<a<<", "; } }; class B { private:

A.10,10,10

B.10,12,14

C.8,10,12

D.8,12,10

点击查看答案
第2题
有如下程序:#include<iost earn>using namespace std;class TestClass{protected:TestClass(){co

有如下程序: #include<iost earn> using namespace std; class TestClass{ protected: TestClass(){cout<<'x';} TestClass(char C) {cout<<c;} }; class TestClass1:public TestClass { public: TestClass1(char C) {Cout<<c;) }; int main(){ TestClass1 d1('y'); return 0; } 执行这个程序,屏幕上将显示输出()。

A.y

B.yx

C.xy

D.yy

点击查看答案
第3题
若有以下程序,执行后输出结果是 。 include int f(); }
点击查看答案
第4题
若有以下程序 #include <stdio.h>

A.10

B.7

C.6

D.3

点击查看答案
第5题
若有以下程序 #includeint main()

A.10

B.7

C.6

D.3

点击查看答案
第6题
若有以下程序 #include <stdio.h> main() {

A.第4行

B.第5行

C.第6行

D.第7行

点击查看答案
第7题
若有以下程序 include<stdio.h> main(){ inta=-11.b=10; a/=b/=4: printf(%d%d\n,a,b);

若有以下程序 include<stdio.h> main(){ inta=-11.b=10; a/=b/=4: printf(%d%d\n,a,b);} 则程序的输出结果是

A.-1-2

B.5-2

C.4-3

D.41762

点击查看答案
第8题
若有以下程序 #include <stdio.h>

A.1, 14, 3

B.0, 14, 3

C.0, 18, 3

D.0, 14, 6

点击查看答案
第9题
若有以下程序 #include ...

若有以下程序 #include <stdio.h> int f(int a[], int n) { if (n > 1) { int t; t=f(a, n-1); return t > a[n-1] ? t : a[n-1]; } else return a[0]; } main() { int a[] = {8,2,9,1,3,6,4,7,5}; printf("%d\n", f(a, 9)); } 则程序的输出结果是()

A、9

B、1

C、8

D、5

点击查看答案
账号:
你好,尊敬的用户
复制账号
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改
欢迎分享答案

为鼓励登录用户提交答案,简答题每个月将会抽取一批参与作答的用户给予奖励,具体奖励活动请关注官方微信公众号:简答题

简答题官方微信公众号

警告:系统检测到您的账号存在安全风险

为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!

微信搜一搜
简答题
点击打开微信
警告:系统检测到您的账号存在安全风险
抱歉,您的账号因涉嫌违反简答题购买须知被冻结。您可在“简答题”微信公众号中的“官网服务”-“账号解封申请”申请解封,或联系客服
微信搜一搜
简答题
点击打开微信