第1题:
在窗体上画一个命令按钮,然后编写如下程序:Sub S1(ByVal x As Integer, By Val y As Integer) Dim t As Integer t=x x=y y=tEnd SubPrivate Sub Command1_ Click() Dim a As Integer, b As Integer a=10 b=30 S1 a,b Print "a=";a="b=";bEnd Sub 程序运行后,单击命令按钮,输出结果是______。
A.a=30 b=10
B.a=30 b=30
C.a=10 b=30
D.a=10 b=10
第2题:
在窗体上画—个命令按钮(名称为Command1),并编写如下代码:Function Fun1 (ByVala As Integer, b As Integer)As Integer Dim t As Integer t=a-b b=t+ a Fun 1=t+ bEnd FunctionPrivate Sub Command1_ Click() Dim x As Integer x=10 Print Fun1(Fun1 (x,(Fun1(x,x-1))),x-1)End Sub程序运行后,单击命令按钮,输出结果是 ______。
A.10
B.0
C.11
D.21
第3题:
在窗体上画一个命令按钮,名称为Command1。然后编写如下程序: Pnvate Sub Command1_Click() Dim x As Integer,y As Integer,t As Integer x=10:y=20:t=0 If x=y Then t=x:x=y:y=t Print x;y End Sub程序运行后,如果单击命令按钮,则在窗体上显示的内容是( )。
A.10 20
B.20 0
C.20 10
D.20 20
第4题:
下列程序的执行结果为 Private Sub Comrnandl_Click( ) Dim p As Integer, q As Integer p=12:q=20 Call Value(p, q) Print p; q End Sub Private Sub Value(ByVal m As Integer, ByVal n As Integer) m=m * 2: n=n - 5 Print m; n End Sub
A.20 12 20 15
B.12 20 12 25
C.24 15 12 20
D.24 12 12 15
第5题:
当Form1_Click事件发生时,程序的输出结果是( )。 Private Sub Form_Click() Dim M As Integer,k As Integer,t As Integer M=5:k=7 Select Case M Case Is<0 M=M+5 Case 1 To 10 t=M:M=k:k=t Case Else M=k Mod 3 End Select Print M,k,t End Sub
A.5 5 7
B.5 7 5
C.7 5 5
D.7 5 7
第6题:
假定有以下两个过程: Sub Sl(ByVal x As Integer,ByVal y As Integer) Dim t As Integer t=x x=y y=t End Sub Sub S2(x As Integer,y As Integer) Dim t As Integer t=x x=y y=t End Sub 则以下说法中正确的是______。
A.用过程S1可以实现交换两个变量的值的操作,S2不能实现
B.用过程S2可以实现交换两个变量的值的操作,S1不能实现
C.用过程S1和S2都可以实现交换两个变量的值的操作
D.用过程S1和S2都不能实现交换两个变量的值的操作
第7题:
1
3
5
6
8
第8题:
r=2 s=4 t=6
r=2 s=4 t=14
r=6 s=8 t=6
r=6 s=8 t=14
第9题:
第10题:
7
6
5
4
3
第11题:
第12题:
5
6
8
10
11
第13题:
在窗体上画一个命令按钮,然后编写如下程序: Sub S1(By Val x As Integer, By Val y As Integer) Dim t As Integer t=x x=y y=r End Sub Private Sub Command1_Click() Dim a As Integer, b As Integer a=10 b=30 S1 a,b Print"a=";"b=";b End Sub 程序运行后,单击命令按钮,.输出结果是______。
A.a=30 b=10
B.a=30 b=30
C.a=10 b=30
D.a=10 b=10
第14题:
单击一次窗体之后,下列程序代码的执行结果为______。 Private Sub Command1_ Click() Dim a As Integer, b As Integer, c As Integer a = 1: b = 2: c = 4 Print Value(a, b,C)End Sub Function Num(x As Integer, y As Integer, z As Integer) Num = x * x + y * y + z * z End Function Function Value(x As Integer, y As Integer, z As Integer) Value = Num(x, y, z) + 2 * x End Function
A.21
B.23
C.19
D.35
第15题:
在窗体上画一个按钮,然后编写如下事件代码。单击按钮,输出为 ______。 Private Function fun3(x As Integer) Static t As Integer t = t + 3 t = t + x fun3 = t End Function Private Sub Commandl Click() Dim a As Integer, b As Integer, c As Integer a = 2 : b = 1 c = fun3 (A)c = fun3 (B)Print c End Sub
A.6
B.8
C.9
D.12
第16题:
A.Unique
B.Check
C.Referential
D.Informational
第17题:
在窗体上画一个命令按钮,然后编写如下程序: Private Sub Commandl_Click( ) Dim a AS Integer,b As Integer a=15 b=2 t N(a,B)End Sub Function N(x As Integer,y As Integer) As Integer N=IIf(x)y,x,y) End Function 程序运行后,单击命令按钮,输出结果为
A.1
B.2
C.15
D.8
第18题:
Which of the following constraint types can be used to ensure the value of an INTEGER column references only positive values?()
第19题:
第20题:
-3
-2
-1
0
1
第21题:
-1/2
-1/3
1/3
1/2
2
第22题:
-2
3
-1
0
1
第23题:
第24题: