首页 > 外贸类考试
题目内容 (请给出正确答案)
[判断题]

下面程序的输出结果为(1,3),t=(1,2,3),t=t.remove(2),print(t)()

答案
收藏

如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“下面程序的输出结果为(1,3),t=(1,2,3),t=t.…”相关的问题
第1题
在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click()Dim a()a=Array(1,3

在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim a() a=Array(1,3,5,7) s=0 For i=1 To 3 s=s*10+a(i) Next i Print s End Sub 程序运行后,输出结果为()。

A.135

B.357

C.531

D.753

点击查看答案
第2题
‏下面程序的输出是()。‏#include‏void main()‏{int a=-1,b=4,k;‏k=(a++<0)&&(!(b--<=0));‏printf("%d,%d,%d%/n",k,a,b);}

A.1,-1,3

B.0,0,3

C.0,-1,2

D.1,0,3

点击查看答案
第3题
下列程序的输出结果为()。 S1=”1”:S2=”2”:SI=Val(S1)+Val(S2):S2=Val(”12”) If S1<>S2 T

下列程序的输出结果为()。 S1=”1”:S2=”2”:SI=Val(S1)+Val(S2):S2=Val(”12”) If S1<>S2 Then P int S1-S2 Else Print S2-S1

A.-9

B.9

C.-12

D.0

点击查看答案
第4题
有下列程序,程序运行后单击命令按钮,则输出的结果为()。Private Sub Command1_Click()Dim a%(1 To

有下列程序,程序运行后单击命令按钮,则输出的结果为()。Private Sub Command1_Click()Dim a%(1 To 4),b%(3 To 6),i%,s1#,s2# For i=1 To 4 a(i)=i Next i For i=3 To 6 b(i)=i Next i s1=Factorial(A) s2=Factorial(B)Print "s1=";s1;"s2=";s2End SubFunction Factorial(a()As Integer)Dim t#,i% t=1 For i=LBound(A)To UBound(A) t=t*a(i) Next i Factorial=tEnd Function

A.s1=360 s2=24

B.s1=24 s2=360

C.s1=24 s2=24

D.s1=360 s2=360

点击查看答案
第5题
下面程序的输出结果为()struct st{int x; int*y;}*p;int dt[4]={10,20,30,40};struct st aa[4]=

下面程序的输出结果为() struct st { int x; int *y; } *p; int dt[4]={10,20,30,40}; struct st aa[4]={50,&dt[0],60,&dt[1], 70,&dt[2],80,&dt[3]}; main() { p=aa; printf("%d\n",++p->x); printf("%d\n",(p)->x); printf("%d\n",++(*p->y)); }

A.10 20 20

B.50 60 21

C.51 60 21

D.60 70 31

点击查看答案
第6题
下面运行程序后,单击命令按钮,输出的结果是 【】 。 Private Sub Command1_Click()Dim a%(1 To 5),i

下面运行程序后,单击命令按钮,输出的结果是 【 】 。

Private Sub Command1_Click()

Dim a%(1 To 5),i%, s#

For i=1 To 5

a(i)=i

Next

s=Fun(a)

Print "s="; s;

End Sub

Function Fun(a() As Integer)

Dim t#, i%

t=1

For i=LBound(a) To UBound(a)

t=t  a(i)

Next

Fun=t

End Function

点击查看答案
第7题
为使下列程序的正确输出结果为: Now is 2004-7-6 12:12:12 那么应该在程序划线处填入的语句是()。

为使下列程序的正确输出结果为: Now is 2004-7-6 12:12:12 那么应该在程序划线处填入的语句是()。 #include <iostream> using namespace std; class TIME; class DATE { public: DATE(int y=2004,int m=1,int d=1) { year=y; month=m; day=d; } void DateTime(TIME &t); private: int year,month, day; }; class TIME { public: TIME(int h=0,int m=0,int s=0) { hour=h; minute=m; second=s; } ______________; //将类 DATE 中成员函数 DateTime 声明为类 TIME 的友元函数 private: int hour,minute, second; }; void DATE: :DateTime(TIME &t) { cout<<"Now is "<<year<<'-'<<month<<'-'<<day<< ' '<<t.hour<<":"<<t.minute<<': '<<t.seoond<<'.'<<end1; } int main () { DATE d(2004,7,6); TIME t (12, 12, 12); d. DateTime (t); return 0; }

A.friend void DateTime(TIME &t);

B.friend void DATE::DateTime(TIME &0;

C.void DateTime(TIME &t);

D.friend void DateTime(TIME &t);

点击查看答案
第8题
下面程序的输出结果是()。#include<iostream>using namespace std;void swap(int x[2]){int t; t=

下面程序的输出结果是()。 #include<iostream> using namespace std; void swap(int x[2]) { int t; t=x[0]; x[0]=x[1]; x[1]=t; } void main() { int a[2]={4,8}; swap(a); cout<<a[0]<<" "<<a[1]; }

A.4 8

B.8 4

C.4 4

D.8 8

点击查看答案
第9题
下面程序的输出结果是()。 typedefunion {long x[1]; int y[4]; char z[10]; }M; M t; main() {printf("%d\n",sizeof(t)); }

A.32

B.26

C.10

D.4

点击查看答案
第10题
设有如下程序,其调试结果为:class Q2 {public static void main(String[] args) {int[] seeds

设有如下程序,其调试结果为:

class Q2 {

public static void main(String[] args) {

int[] seeds = {1,2,3,4,6,8};

int n= seeds.length;

for (int i = 0; i< 3; i++)

for (int k = 0; k< n-1; k++)

seeds[k]= seeds[k+1];

for (int i = 0; i

System.out.print("/t"+seeds[i]);

}

}

A.输出: 1 2 3 4 6

B.输出: 4 6 8 8 8

C.输出: 2 3 4 6 8

D.输出: 2 3 4 6

点击查看答案
第11题
下面程序的执行结果为‘#include"iostream"using namespace std;class A{ int a; public: void Se

下面程序的执行结果为 ‘ #include"iostream" using namespace std; class A { int a; public: void Sera(int x){a=x;} void Display_a(){cout<<a<<endl;} }; class B { int b; public: void Setb(int x){ b=x;} void Dispaly_b() {cout<<b<<endl;} }; class C:public A,private B { private: int c; public: void Setc(int x,int y,int z) { c=z;Sera(x);Serb(y);} void Display_c(){cout<<c<<endl;} }; ① void main() ② { ③ C cc; ④ cc.Seta(1); ⑤ cc.Display_a(); ⑥ cc.Setc(2,2,3); ⑦ cc.Dispaly_b(); ⑧ cc.Display_c(); }

A.输出为2 2 3

B.有错误在第5行

C.输出为1 2 3

D.有错误在第7行

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