执行语句 Dim X, Y as Integer 后,()
第1题:
下面可以正确定义两个整型变量和—个字符串变量的语句是______。
A.Dim n,m As Integer,s As String
B.Dim a%,b$,c As String
C.Dim a As Integer,b,c As String
D.Dim x%,y As Integer,z As String
第2题:
执行语句 Dim X, Y as Integer 后,
A ) X 和 Y 均被定义为整型变量
B ) X 和 Y 被定义为变体类型变量
C ) X 被定义为整型变量, Y 被定义为变体类型变量
D ) X 被定义为变体类型变量, Y 被定义为整型变量
第3题:
下面可以正确定义2个整形变量和1个字符串变量的语句的是( )。
A.Dim n,m AS Interger,s AS String
B.Dim a%,b$,c AS String
C.Dim a AS Integer,b,c AS String
D.Dim x%,y AS Integer,z AS String
第4题:
以下定义数组或给数组元素赋值的语句中,正确的是
A.Dim x%(2) x(1)="等级考试"
B.Dim x(3), y(3)As Integer x(0)=1:y=x
C.Dim x x=Array(0,1,2)
D.Dim x(3)As Integer x=Array(0,1,2)
第5题:
(13)单击命令按钮时,下列程度的执行结果是 Private Sub Command1_Click() Dim a As Integer,b As Integer,c As Integer a=2:b=4:c=6 Call S2(a,b) Print"a=";a;"b=";b;"c=";c; End Sub Private Sub S1(x As Integer,y As Integer) Dim c As Integer x=2*x:y=y+2:e=x+y End Sub Sub S2(x As Integer,By Val y As Integer) Dim e As Integer x=2*x:y=y+2:e=x+y End Sub A.a=4 b=6 c=6 B.a=8 b=6 c=6 a=4 b=6 c=6 a=8 b=6 c=6 C.a=4 b=6 c=6 D.a=8 b=6 c=6 a=8 b=6 c=6 a=4 b=6 c=6
第6题:
( 11 )下面可以正确定义 2 个整形变量和 1 个字符串变量的语句的是( )
A ) Dim n,m AS Interger,s AS String
B ) Dim a%,b$,c AS String
C ) Dim a AS Integer,b,c AS String
D ) Dim x%,y AS Integer,z AS String
第7题:
单击命令按钮时,下列程序代码的执行结果为( )。 Private Function FirProc(x As Integer,y As Integer,z As Integer) FirProc=2*x+y+3*z End Funcfion Private Function SecProc(x As Integer,y As Integer,z As Integer) SecProc=FirProc(z,x,y)+x End Funcfion Private Sub Command1_Click() Dim a As Integer Dim b As Integer Dim c As Integer a=2 b=3 c=4 Printf SecProc(c,b,a) End Sub
A.21
B.19
C.17
D.34
第8题:
单击命令按钮执行下列程序,其输出结果是。 Private Sub Commana1_Click() Dim a As Integer,b As Integer,c As Integer a = 3 b = 4 c = 5 Print SecProc(c,b,a) End Sub Function FirProc(x As Integer,y As Integer,z As Integer) FirProc = 2 * x + y + 3 * z End Function Function SecProc(x As Integer,y As Integer,z As Integer) SecProc = FirProc(z,x,y) + x End FunctionA. 20 B. 22 C. 28 D. 30
第9题:
单击命令按钮时,下列程序代码的执行结果为______。 Private Sub Proe1 (n As Integer,ByVa1 m As Integer) n=n Mod 10 m=m\ 10 End Sub Private Sub Command1_Click() Dim x As Integer Dim y As Integer x= 12 y = 34 Call Proe1 (x, y) Print x; y End Sub
A. 12 34
B.2 34
C.2 3
D.12 3
第10题:
单击命令按钮时,下列程序代码的执行结果为 ( ) Function FirProc(x As Integer, y As Integer, z As Integer) FirProc=2*x+y+3*z End Function Function SecProc(x As Integer, y As Integer, z As Integer) SecProc=FirProc(z, x, y)+x End Function Private Sub Commandl Click() Dim a As Integer, b As Integer, c As Integer a=2 :b=3 :c=4 Print SecProc(c, b,A)End Sub
A.21
B.19
C.17
D.34