未知题型
当发生Command1_C1ick事件后,以下程序的输出结果是 Private Sub Command1_Click() Dim i As Integer Dim a(10) As Integer For i=9 To 0 Step -1 a(i)=10-i Next i Print a(2);a(5);a(8) End Sub
A.2 5 8
B.7 4 1
C.8 5 2
D.3 6 9
- A.2
B.7
C.8
D.3
【参考答案】
C
解析:本题主要考查对循环语句的理解。i=2时,执行语句a(i)=10-i得a(2)=10-2即a(2)为8。......
(↓↓↓ 点击下方‘点击查看答案’看完整答案 ↓↓↓)
点击查看答案
相关考题
-
单项选择题
要标注尺寸,其上、下偏差应设为( ) A、-0.025,0.045 B、-0.025,-0.045 C、0.025,0.045 -
未知题型
下列广告属于哪种广告类型? -
未知题型
在窗体上画两个标签和一个命令按钮,其名称分别为Label1、Label2和Command1,然后编写如下程序: Private Sub func(L As Label,ByVal a As Integer) L.Caption='1234' a=a*a End Sub Private Sub Form_Load() Label1.Caption='ABCD' Label2.Caption=10 End Sub Private Sub Command1_Click() a=Val(Label2.Caption) Call func(Label1,A)Label2.Caption=a End Sub 程序运行后,单击命令按钮,在两个标签Label1和Label2中显示的内容分别是: ______。A.ABCD和10B.1234和100C.ABCD和100D.1234和10
A.Caption='1234'
B.Caption='ABCD'
C.Caption=10
D.Caption)
E.Caption=a
F.ABCD和10
B.1234和100
C.ABCD和100
