第1题:
A、Sub plus(sum, a , b ): sum = a + b: End Sub
B、Sub plus(ByVal sum , a , b ): sum = a + b: End Sub
C、Sub plus(sum , ByVal a, ByVal b ): sum = a + b: End Sub
D、Sub plus(sum , ByRef a , ByRef b ): sum = a + b: End Sub
第2题:
在窗体中添加一个名称为Commandl的命令按钮,然后编写如下程序:Public X As Integer Private Sub Commandl Click( )x=10 Call slCall s2MsgBox x End Sub Private Sub sl( )x=x+20 End Sub Private Sub s2( )Dim x As Integer x=x+20End Sub窗体打开运行后,单击命令按钮,则消息框的输出结果为( )。
A.10
B.30
C.40
D.50
第3题:
在窗体上画一个命令按钮和两个文本框,其名称分别为Command1、Text1和Text2,然后编写如下程序: Dim S1 As String,S2 As String Private Sub Form_Load() Text1.Text="" Text2.Text="" End Sub Private Sub Text1_KeyDown(KeyCode As Integer,Shift As Integer) S2=S2 & Chr(Keycode) End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) S1=S1 & Chr(KeyAscii) End Sub Private Sub Command1_Click() Text1.Text=S2 Text2.Text=S1 S1="" S2="" End Sub 程序运行后,在Text1中输入“abc”,然后单击命令按钮,在文本框Text1和Text2中显示的内容分别为______。
A.abc和ABC
B.abc和abe
C.ABC和abc
D.ABC和ABC
第4题:
在窗体中添加一个名称为Command1的命令按钮,然后编写如下程序: Public x As Integer Private Sub Command1_Click() x=10 Call s1 Call s2 MsgBox x End Sub Private Sub sl() x=x+20 End Sub Private Sub s2() Dim x As Integer x=x+20 End Sub 窗体打开运行后,单击命令按钮,则消息框的输出结果为( )。
A.10
B.30
C.40
D.50
第5题:
写出程序运行的结果
Public class Base
Public virtual string Hello() {return “Base”;}
Public class Sub:Base
Public override string Hello() {return “Sub”;}
1. Base b = new Base(); b.Hello;
2. Sub s = new Sub(); s.Hello;
3. Base b = new Sub (); b.Hello;
4. Sub s = new Base(); s.Hello;
第6题:
在窗体中添加一个名称为Command1的命令按钮,然后编写如下程序: Public x As Integer Private Sub Command1_Click() x=10 Call s1 Call s2 MSgBox x End Sub Private Sub s1() x=x+20 End Sub Private Sub s2() Dim x As Integer x=X+20 End Sub 窗体打开运行后,单击命令按钮,则消息框的输出结果为______。
A.10
B.30
C.40
D.50
第7题:
编写如下事件过程: Private sub sub1 (ByVal x1 As String, y1 As String) Dim xt As String Dim i As Integer i = Len(x1) Do While i>= 1 xt = xt + Mid(x1, i, 1) i=i-1 Loop y1 = xt End Sub Private Sub Form. Click() Dim s1 As String, s2 As String s1= "teacher" sub1 s1, s2 Print s2 End Sub 程序运行后,单击窗体,则窗体上显示的内容是
A.rehcaet
B.tahreee
C.themee
D.eerthea
第8题:
在窗体中添加一个命令按钮(名为Command1),然后编写如下代码:
Public x as integer
Private Sub Command1_Click( )
x=5
Call s1
Call s2
MsgBox x
End Sub
Private Sub s1( )
x=x+10
End Sub
Private Sub s2( )
Dim x as integer
x=x+10
End Sub
窗体打开运行后,单击命令按钮,则消息框的输出结果是______
第9题:
在窗体中添加一个名称为Commandl的命令按钮,然后编写如下程序: Public x As Integer Private Sub Commandl_click() x=10 Call s 1 Call s 2 MsgBOx x End Sub Pfivate Sub s1() x=x+20 End Sub Private Sub
A.10
B.30
C.40
D.50
第10题:
在窗体上画一个命令按钮和两个文本框,其名称分别为Command1、Text1和Text2,在属性窗口中把窗体的KeyPreview属性设置为True,然后编写如下程序: Diln S1 As String,S2 As String Private Sub Form. Load( ) Text1.Text="" Text2.Text="" Text1.Enabled=False Text2.Enabled=False End Sub Private Sub Form. KeyDown(KeyCode As Integer,Shift As Integer) S2=S2&Chr(KeyCode) End Sub Pri vate Sub Form. KeyPress(KeyAscii As Integer) S1=S1&Chr(KeyAscii) End Sub Private Sub Command1 Click( ) Text1.Text=S1 Text2.Text=S2 S1="" S2="" End Sub 程序运行后,先后按“a”、“b”、“c”键,然后单击命令按钮,在文本框Text1和Text2中显示的内容分别为( )。
A.abc和ABC
B.空白
C.ABC和abc
D.出错