注意:此页面搜索的是所有试题
国家开放大学Visual Basic6.0程序设计
Private Sub Command1_Click()
Dim M(5)
For I = 1 To 5
M(I) = I * I
Next I
Print M(I - 1)
End Sub
程序运行后,单击命令按钮,在窗体上显示的值是( )。
A、5 B、25
C、05 D、16
Sub Change(x As Integer, y As Integer)
Dim t As Integer
t = x
x = y
y = t
Print x, y
End Sub
Private Sub Form_Click()
Dim a As Integer, b As Integer
a = 30: b = 40
Change a, b
Print a, b
End Sub
程序运行后,单击窗体,在窗体上显示的值是( )。
A、
30 40
30 40
B、
30 40
40 30
C、
40 30
40 30
D、
40 30
30 40
Sub test(i As Integer)
i = i + 4
End Sub
Private Sub Form_Click()
Dim x As Integer
x = 5
Print "x="; x
Call test(x)
Print "x="; x
End Sub
程序运行后,单击窗体,在窗体上显示的值是( )。
A、x= 5 x= 9
B、x= 9 x= 5
C、
x= 5
x= 9
D、9 5
Function F(a As Integer)
Dim b As Integer
Static c As Integer
b = b + 2
c = c + 3
F = a + b + c
End Function
Private Sub Command1_Click()
Dim a As Integer
a = 4
For i = 1 To 3
Print F(a);
Next i
End Sub
程序运行后,单击窗体,在窗体上显示的值是( )。
A、9 9 9
B、9 12 15
C、9 14 19
D、9 11 13
Private Sub Form_Click()
Dim x, y As Integer
x = 5: y = 10
nc x, y
Print x, y
End Sub
Private Sub nc(ByVal a%, b%)
a = a + b
b = a
a = a * b
End Sub
程序运行后,单击窗体,在窗体上显示的值是( )。
A、5 15
B、15 15
C、225 15
D、5 10
Sub abcd(ByVal n As Integer)
n = n + 5
End Sub
Private Sub Form_click()
nx% = 3
Call abcd(nx%)
Print nx%
End Sub
程序运行后,单击窗体,在窗体上显示的值是( )。
A、5
B、3
C、9
D、10
Dim y As Integer
Private Sub form_click()
Dim x As Integer
x = 1
y = 2
Call AA(y + 1)
z = BB(x)
Print x, y, z
End Sub
Public Sub AA(ByVal z As Integer)
y = z + x
z = x + y
End Sub
Public Function BB(ByRef y As Integer)
y = y + 1
BB = x + y
End Function
程序运行后,单击窗体,在窗体上显示的值是( )。
A、2 2 2
B、2 3 2
C、3 2 3
D、2 3 3
Web(World Wide Web)即全球广域网,也称为万维网
Dim M(5)
For I = 1 To 5
M(I) = I * I
Next I
Print M(I - 1)
End Sub
程序运行后,单击命令按钮,在窗体上显示的值是( )。
A、5 B、25
C、05 D、16
Sub Change(x As Integer, y As Integer)
Dim t As Integer
t = x
x = y
y = t
Print x, y
End Sub
Private Sub Form_Click()
Dim a As Integer, b As Integer
a = 30: b = 40
Change a, b
Print a, b
End Sub
程序运行后,单击窗体,在窗体上显示的值是( )。
A、
30 40
30 40
B、
30 40
40 30
C、
40 30
40 30
D、
40 30
30 40
Sub test(i As Integer)
i = i + 4
End Sub
Private Sub Form_Click()
Dim x As Integer
x = 5
Print "x="; x
Call test(x)
Print "x="; x
End Sub
程序运行后,单击窗体,在窗体上显示的值是( )。
A、x= 5 x= 9
B、x= 9 x= 5
C、
x= 5
x= 9
D、9 5
Function F(a As Integer)
Dim b As Integer
Static c As Integer
b = b + 2
c = c + 3
F = a + b + c
End Function
Private Sub Command1_Click()
Dim a As Integer
a = 4
For i = 1 To 3
Print F(a);
Next i
End Sub
程序运行后,单击窗体,在窗体上显示的值是( )。
A、9 9 9
B、9 12 15
C、9 14 19
D、9 11 13
Private Sub Form_Click()
Dim x, y As Integer
x = 5: y = 10
nc x, y
Print x, y
End Sub
Private Sub nc(ByVal a%, b%)
a = a + b
b = a
a = a * b
End Sub
程序运行后,单击窗体,在窗体上显示的值是( )。
A、5 15
B、15 15
C、225 15
D、5 10
Sub abcd(ByVal n As Integer)
n = n + 5
End Sub
Private Sub Form_click()
nx% = 3
Call abcd(nx%)
Print nx%
End Sub
程序运行后,单击窗体,在窗体上显示的值是( )。
A、5
B、3
C、9
D、10
Dim y As Integer
Private Sub form_click()
Dim x As Integer
x = 1
y = 2
Call AA(y + 1)
z = BB(x)
Print x, y, z
End Sub
Public Sub AA(ByVal z As Integer)
y = z + x
z = x + y
End Sub
Public Function BB(ByRef y As Integer)
y = y + 1
BB = x + y
End Function
程序运行后,单击窗体,在窗体上显示的值是( )。
A、2 2 2
B、2 3 2
C、3 2 3
D、2 3 3
Web(World Wide Web)即全球广域网,也称为万维网