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

【简答题】写出程序运行结果。 #include <iostream> using namespace std; int a[10]= {1,2,

3, 4, 5, 6, 7, 8, 9, 10}; int fun(int i); int main() { int i ,s=0; for(i=0; i<=10; i++) { try s="s+fun(i);" } catch(int) answer">

7、【简答题】写出以下程序的运行结果:【简答题】写出程序运行结果。 #include <iostream> using namespace【简答题】写出程序运行结果。 #include <iostream> using namespace

提问人:网友chenyi414 发布时间:2022-01-07
参考答案
  抱歉!暂无答案,正在努力更新中……
如搜索结果不匹配,请 联系老师 获取答案
更多“【简答题】写出程序运行结果。 #include <iostr…”相关的问题
第1题
写出下面程序执行后的运行结果。 #include <iostream> #include <string> using namespace std; void f____ { char *t; int i,j; for____ for ____ if ____ > 0) { t = p[i]; p[i] = p[j]; p[j] = t; } } void main____ { char *p[5] = { "abc", "aabdfg", "abbd", "dcdbe", "cd" }; f____; cout << strlen____; }
点击查看答案
第2题
有以下程序 #include <iostream> using namespace std; int main() { int a=5,b=0,c=0; if(a=b+c)cout<<″***″< else endl; return 0; }> A、输出$$$

B、可以通过编译但不能通过连接

C、输出***

D、有语法错不能通过编译

点击查看答案
第3题
有如下程序: #include <iostream> using namespace std; class Base{ protected: Base(){cout<<'a';} base(char }; derived:public base{ public: derived(char int main(){ derived d1('b'); return 0; }> A、B

B、BA

C、AB

D、BB

点击查看答案
第4题
有如下程序:

#include

using namespace std;

class AA{

int k:

protected:

int n;

void setK(int k){mis->k=k;}.

public:

void setN(int n){tllis->n=n;}

};

class BB:public AA{/*类体略*/};

int main(){

BB X;

x.n=l: //1

x.setN(2); //2

x.k=3: ///3

X.setK(4); //4

return 0;

}

在标注号码的4条语句中正确的是

A.1

B.2

C.3

D.4

点击查看答案
第5题
下面代码运行结果是 。 using namespace std; #include <iostream> int f(int x) { static int u=1; x += x; return u *= x; } int main(){ int x=10; cout<<f(x)<< '\t'; return 0;> A、10 20

B、20 800

C、20 400

D、20 20

点击查看答案
第6题
写出程序的运行结果 #include <iostream> using namespace std; class A { public: A() { cout << "A() firing" << endl; } virtual ~A() { cout << "~A() firing" << endl; } }; class Z :public A { public: Z() { cout << "Z() fring" << endl; } ~Z() { cout << "~Z() fring" << endl; } }; int main() { A* p; p = new Z; delete p; return 0; }
点击查看答案
第7题
下面程序输出是: using namespace std; #include <iostream> int t(){ static int i; i+=5; return i; } int main(void){ cout << t() << '\t'; cout << t() << '\n'; return 0 ; }

A、0 5

B、5 5

C、5 10

D、随机数

点击查看答案
第8题
请写出下题的运行结果: #include<iostream> using namespace std; class B { public: void print(){cout<<"b";} }; d:public b { public: void main() d *pd="new" d(); *pb="pd;" pb->print(); pd->print(); delete pd; }
点击查看答案
第9题
【单选题】关于函数声明float fun(int a,int b) throw ();下列叙述正确的是( )。

A、

B、

C、

D、

点击查看答案
第10题
会计核算的主要特点( )。

A、价值管理

B、实物管理

C、技术管理

D、物资管理

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

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

简答题官方微信公众号

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

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

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