更多"下列程序段运行后窗体上输出结果为( )。 Private Sub "的相关试题:
[单项选择]下列程序段运行后窗体上输出结果为( )。
Private Sub Command1 Click( )
a=5:b=4:c=3:d=2
X=3>2*b Or a=c And b<>C Or c>d
Print X
End Sub
A. 1
B. True
C. False
D. 2
[单项选择]程序段如下:
Private Sub Command1_ Click( )
a = 0
for 1=15 To 15 Step- 2
a = a +1
Next I
Print a, I
End Sub
发生Command 1的单击事件后,程序的输出结果是 ______。
A. 0 13
B. 15 13
C. 0 15
D. 15 15
[单项选择]在窗体上画一个命令按钮,并编写如下事件过程:
Private Sub Command1_Click( )
For i=5 To 1 Step-0.8
Print Int(i);
Next i
End Sub
运行程序,单击命令按钮,窗体上显示的内容为
A. 5 4 3 2 1 1
B. 5 4 3 2 1
C. 4 3 2 1 1
D. 4 4 3 2 1 1
[单项选择]在窗体上画一个命令按钮,然后编写如下事件过程:
Private Sub Command1_ Click ( )
x = InputBox("Enter the First integer")
y = InputBox("Enter the Second integer")
Print y +x
End Sub
程序运行后,单击命令按钮,先后在两个输入对话框中分别输入456和123,则输出结果是 ______。
A. 579
B. 123
C. 456
D. 123456
[单项选择]在窗体上画一个命令按钮,然后编写如下代码:
Private Sub Command1_Click( )
a&=InputBox("请输入第一个数")
b&=InputBox("请输入第二个数")
Print b&+a&
End Sub
程序运行后,单击命令按钮,在两个输入对话框中先后输入12345和54321,程序的输出结果是
A. 66666
B. 54321 12345
C. 1234554321
D. 出错
[单项选择]下列程序运行后会出现错误的提示为
Private Sub Command1_Click( )
Dim i AS Integer
Dim x
x=Array(2,3, 4, 5, 6, 7)
For Each i In x
Print i;
Next i
End Sub
A. 数组的下标超界
B. For Each数组的控制变量必须为变体变量
C. 关键字Each的位子不对
D. x应该定义成数组
[单项选择]下列代码运行后输出结果是
Defstr B-E
Private Sub Command1_Click( )
B$="123"
C="456"
Print B+C$
End Sub
A. 123456
B. "123456"
C. 123+"456"
D. 显示出错信
[单项选择]执行以下程序后输出的是
Private Sub Command1_Click( )
Ch$="ABCDEFGH"
Print Mid(Right(Ch$,6), Len(Left(Ch$,4)),2)
End Sub
A. CDEFGH
B. ABCD
C. FG
D. AB
[单项选择]下面程序的输出是______。
Private Sub Command1_Click( )
Print 7/3
End Sub
A. 3.5
B. 7
C. 3
D. 2
[单项选择]单击窗体上Command1命令按钮时,执行如下事件过程:
Private Sub Command1-Click( )
a$="software and hardware"
b$=Right(a$,8)
c$=Mid(a$,1,8)
Msgbox a $,,b$;c$,1
End sub
则在弹出的信息框的标题栏中显示的信息是( )。
A. software and hardware
B. software
C. hardware
D. 1
[单项选择]在窗体上画一个命令按钮,然后编写如下事件过程:
Private Sub Command1_Click( )
MsgBox Str(123+321)
End Sub
程序运行后,单击命令按钮,则在信息框中显示的提示信息为
A. 123+321
B. 字符串"444"
C. 数值444
D. 空白
[单项选择]在窗体上有一个名为Command1的命令按钮,并有如下事件过程:
Private Sub Command1_Click( )
a$="Swallows Mod Genulled"
b$=Right(a$,8):c$=Mid(a$,1,8)
MsgBox a$,b$,c$,1
End Sub
程序执行时,单击命令按钮,则在弹出的消息框的标题栏中显示的是( )。
A. Swallows Mod Genulled
B. Genulled
C. Swallows
D. 1
[单项选择]在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程:
Private Sub Command1_Click( )
Dim a As Integer, b As Integer, c As Integer
a=1:b=2:c=3
Print fun2(c,b,
[单项选择]在窗体上画一个命令按钮(名称为Command1),然后编写如下事件过程:
Private Sub Command1_Click( )
A=4 : b=5 : c=6
Print a=b+c
End Sub
程序运行后,单击命令按钮,其结果为______。
A. a=11
B. a=b+c
C. False
D. 出错
[单项选择]有如下事件过程:
Private Sub Command1_Click( )
b=10
Do Until b =-1
a = InputBox("请输入a的值")
a = Val(