首页 > 软考
题目内容 (请给出正确答案)
[单选题]

下面程序执行后的输出结果是()。#includeenumTEST{A,B,C,D,E}ivoidmain(){inta[5]={10,20,30,40,50}i=Awhile(i<=E){printf("%4d",a[i])i=(enumTEST)((int)i+1)}printf("/n")}

A.1020

B.102030

C.10203040

D.1020304050

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“下面程序执行后的输出结果是()。#includeenumTE…”相关的问题
第1题
若有以下程序:#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

点击查看答案
第2题
(14)以下程序运行后的输出结果是 【14】 。#include <stdio.h>#include <stdlib.h>#inc

(14)以下程序运行后的输出结果是 【14】 。

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

main()

{ char *p; int i;

p=(char *)malloc(sizeof(char)*20);

strcpy(p,"welcome");

for(i=6;i>=0;i--) putchar(*(p+i));

printf("\n "); free(p);

}

点击查看答案
第3题
执行下面程序后输出的正确结果是Public class Test { public static void main(String args[]){

执行下面程序后输出的正确结果是 Public class Test { public static void main(String args[]){ byte x=3,y=4; long r=80L; System.out.print(r/y); System.out.print(”,”); System.out.print(x/y); } }

A.20.0,1

B.20.0,1.0

C.20,0

D.20,1.0

点击查看答案
第4题
执行下面程序后输出的正确结果是()。 publicclassTest{ publicstaticvoidmain(Stringargs[]){ bytex=3,y=4; longr=80L; System.out.print(r/y); System.out.print(","); System.out.print(x/y); } }

A.20.0,1

B.20.0,1.0

C.20,0

D.20,1.0

点击查看答案
第5题
执行下面程序后输出的正确结果是public class Test{ public static void main(String args[]){by

执行下面程序后输出的正确结果是 public class Test{ public static void main(String args[]){ byte x=3,y=4; long r=80L; System.out.print(r/y); System.out.print(","); System.out.print(x/y); } }

A.20.0,1

B.20.0,1.0

C.20,0

D.20,1.0

点击查看答案
第6题
执行下面程序后输出的正确结果是public class Test{public stoic void main (String args[]){byt

执行下面程序后输出的正确结果是 public class Test{ public stoic void main (String args[]){ byte x=3, y=4; long r=80L; System.out.print(r/y); System.out.print(","); System.out.print(x/y); } }

A.20.0, 1

B.20.0, 1.0

C.20,0

D.20, 1.0

点击查看答案
第7题
执行下面程序后输出的结果是()。#include <iostream>using namespace std;int main(){ int a[4][4

执行下面程序后输出的结果是()。 #include <iostream> using namespace std; int main(){ int a[4][4]={{1,2,3,-4},{7,-12,-13,8},{-21,9,0,-24},{-31,10,-33,11}}; int i,j,s=0; for(i=0;i<4;i++){ for(j=0;j<4;j++){ if(a[i][j]>=0)continue; s+=a[i][j]; } } coat<<s<<endl; return 0; }

A.141

B.-138

C.-1

D.75

点击查看答案
第8题
在窗体上画一个命令按钮,然后编写如下程序: Dim x As Integer Sub inc(a As Integer) x=x+a End

在窗体上画一个命令按钮,然后编写如下程序:

Dim x As Integer

Sub inc(a As Integer)

x=x+a

End Sub

Private Sub Command1_Click()

inc 2

inc 3

inc 4

Msgbox x;

End Sub

程序执行后,单击Command1命令按钮,消息框显示结果是【 】。

点击查看答案
第9题
下面程序的执行结果是()。#include<iostream>using namespace std;class building {public:buildi

下面程序的执行结果是()。 #include<iostream> using namespace std; class building { public: building() {} building(unsigned stories, float breadths, float lengths) { story = stories; breadth = breadths; length = lengths;} void getstory(void) { cout<<"story is:"<<story<<endl;} void getarea(void) { area = length*breadth*story;cout<<"area is:"<<area<<endl;} private: unsigned story; float length; float breadth; float area; }; void main(void) { building b1,b2;building b3(10u,16.6,58.8); b1.getstory(); b1.getarea(); b2.getstory(); b2.getarea(); b3.getstory(); b3.getarea();}

A.story is:0 area is:0 story is:0 area is:0 story is:10 area is:9760.8

B.story is:null area is:null story is:null area is:null story is:10 area is:9760.8

C.前两个对象输出的结果是不定的,后一个对象的结果正确

D.前两个对象没有初值,因此程序编译时出错

点击查看答案
第10题
下列程序段执行后输出的结果是()。 A.90B.60C.40D.10

下列程序段执行后输出的结果是()。

A.90

B.60

C.40

D.10

点击查看答案
第11题
有以下程序: 程序执行后的输出结果是()。A.2B.3C.7D.0

有以下程序:

程序执行后的输出结果是()。

A.2

B.3

C.7

D.0

点击查看答案
退出 登录/注册
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改