题目内容 (请给出正确答案)
[单选题]

有以下程序,程序运行的结果是 ______。#include<iostrem.h>#include<string.h>void min(); }3 3 B.4 4 C.4 10 D.10 10

A.3 3

B.4 4

C.4 10

D.10 10

提问人:网友lixin080108 发布时间:2022-01-07
参考答案
查看官方参考答案
如搜索结果不匹配,请 联系老师 获取答案
网友答案
查看全部
  • · 有5位网友选择 C,占比50%
  • · 有2位网友选择 D,占比20%
  • · 有2位网友选择 A,占比20%
  • · 有1位网友选择 B,占比10%
匿名网友 选择了C
[157.***.***.253] 1天前
匿名网友 选择了A
[41.***.***.64] 1天前
匿名网友 选择了A
[41.***.***.64] 1天前
匿名网友 选择了D
[1.***.***.31] 1天前
匿名网友 选择了C
[98.***.***.36] 1天前
匿名网友 选择了C
[202.***.***.27] 1天前
匿名网友 选择了A
[89.***.***.133] 1天前
匿名网友 选择了C
[75.***.***.215] 1天前
匿名网友 选择了D
[152.***.***.171] 1天前
匿名网友 选择了B
[171.***.***.128] 1天前
匿名网友 选择了C
[217.***.***.123] 1天前
匿名网友 选择了C
[157.***.***.253] 1天前
匿名网友 选择了A
[41.***.***.64] 1天前
匿名网友 选择了D
[1.***.***.31] 1天前
匿名网友 选择了C
[98.***.***.36] 1天前
匿名网友 选择了C
[202.***.***.27] 1天前
匿名网友 选择了A
[89.***.***.133] 1天前
匿名网友 选择了C
[75.***.***.215] 1天前
匿名网友 选择了D
[152.***.***.171] 1天前
匿名网友 选择了B
[171.***.***.128] 1天前
加载更多
提交我的答案
登录提交答案,可赢取奖励机会。
更多“有以下程序,程序运行的结果是 ______。#include…”相关的问题
第1题
以下程序的输出结果是【 】。

include<iostrean.h>

void main(){

int i,a[5];

i=0;

while(i<5){

a[i]=8*(i-2+4*(i>2))%5;

i++;

}

for(i=4;i>=0;i--) cout<<a[i];

}

点击查看答案
第2题
写出下列程序的运行结果【 】。

include <iostream.h>.

include <fstream.h>

include <stdlib.h>

void main()

{

fstream outfile, infile;

outfile.open("data.clat", ios:: out);

if(!outfile)

{

cout<<"Can't open the file."<<end1;

abort();

}

outfile<<" 1234567890"<<end1;

outfile<<"aaaaaaaaa"<<end1;

outfile<<"**********"<<end1;

outfile.close();

infile.open("data. dat ", ios:: in);

if(!infile)

{

cout<<"Can't open the file."<<end1;

abort();

}

char line[80];

int I=0;

while(!infile. eof())

{

I++;

infile.getline(line, sizeof(line));

cout<<I<<":"<<line<<end1;

}

infile.close();

}

点击查看答案
第3题
下列程序的执行结果是()。 #inClude<iostream.h) #include(stdlib.h) class TestClass { public: int x,y; TestClass(){x=y=0;} TestClass(int a,int b){x=a;y=b;} void disp() { cout<<"x="<<x<<",y="<<y<<endl; } }; void main() {

A.x=2,y=2

B.x=2,y=3

C.x=3,y=2

D.x=3,y=3

点击查看答案
第4题
以下程序段的输出结果为( )。 int a, m=2, k=1, *p=&k; a=*p==m; cout<<a;<br> A、-1

B、0

C、1

D、2

点击查看答案
第5题
阅读下面代码,选择正确的输出结果: grade = 97 if grade < 60: print 'E' elif grade >= 60: print 'D' elif grade >= 70: print 'C' elif grade >= 80: print 'B' elif grade >= 90: print 'A'

A、A

B、B

C、D

D、E

点击查看答案
第6题
有以下程序:

include <iostream.h>

include <fstream.h>

include <stdlib.h>

int main()

{

fstream filel,file2;

char line[100];

filel.open("source.txt",ios::in);

if(!file1)

{

cout<<"Can't open file source.txt!"<<end1;

abort();

}

file2.open("dest.txt",ios::out);

if(!file2)

{

cout<<"Can't open file dest.txt!"<<end1;

abort();

}

while(!file1.eof())

{

filel.getline(1ine,100);

file2<<line;

file2<<end1;

}

filel.close();

file2.close();

return 0;

}

此程序实现的功能是【 】。

点击查看答案
第7题
有以下程序:

include <fstream>

include <string>

using namespace std;

int main ()

{

char ch[] = "The end";

ofstream outstr("d:\\put.txt", ios_base: :app);

for (int i = 0; i < strlen(ch ); i++ )

outstr.put(ch[i]);

outstr.close();

return 0;

}

程序实现的功能是【 】。

点击查看答案
第8题
若有以下程序: #include<iostream> usingnamespacestd; voidsub(intx,inty,int*2) { *z=y+x; } int main() { int a,b,C; sub(8,4,&A) ; sub(6,a,&B) ; sub(a,b,&C) ; cout<<a<<","<<b<<","<<c<<end1; return 0; }

A.12,18,30

B.-12,6,8

C.6,8,10

D.12,-18,16

点击查看答案
第9题
对于如下代码 class B { public: void f() { } void g() { f(); } } class D : public B { public: void f() { } void g() { B::f() } } int main() { B b, *pb = & b; D d, *pd = & d; d.g(); pd->B::g(); return 0; }对第14行代码和第15行代码说法正确的是

A、间接调用了D::f() 直接调用了D::g()

B、间接调用了B::f() 间接调用了B::f()

C、间接调用了D::f() 间接调用了B::f()

D、直接调用了D::g() 间接调用了B::g()

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

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

简答题官方微信公众号

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

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

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