下面这段代码中,变量myInteger的结果是()。 Dim myString As String="ABCDE" Dim myInteger As Integer myInteger=myString.IndexOf("D")
第1题:
下面的数组声明中,正确的是( )。
A.Dim pict[3,4] As Integer
B.Dim pict(3,4) As Integer
C.Dim pict[3.4] As Integer
D.Dim pict(3:4) As Integer.
第2题:
假设有如下的记录类型: Type Student number As String name AS String age As Integer End Type 则正确引用该记录类型变量的代码是______。
A.Student. name="" s. name="张红"
B.Dim s As Student s. Dame="张红"
C.Dim s As Type Student s. name="张红"
D.Dim s As Type s. name="张红"
第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题:
设有如下的记录类型: TypeStudent number As String name AS String age As Integer End Type 则正确引用该记录类型变量的代码是( )。
A.Student.name="张红"
B.Dim s As Student s.name="张红"
C.Dim s As Type Student s.name="张红"
D.Dim s As Type s.name="张红"
第5题:
设有如下的用户定义类型: Type Student number As String name As string age As Integer End Type 则以下正确引用该类型成员的代码是______。
A. Student name="李明”
B.Dim s As Student s.name="李明"
C.Dim s As Type Student s.name="李明"
D.Dim s As Type s.name="李明"
第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题:
下面的语句用Array函数为数组变量a的各元素赋整数值:
a=Array(1,2,3,4,5,6,7,8,9)
针对a的声明语句应该是
A.Dim a
B.Dim a As Integer
C.Dim a(9) As Integer
D.Dim a() As Integer
第8题:
下面可以正确定义两个整型变量和—个字符串变量的语句是______。
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
第9题:
下面的数组声明语句中( )是正确的。
A.Dim A[3,4]As Integer
B.Dim A(3,4)As Integer
C.Dim A[3;4]As Integer
D.Dim A[3;4]As Integer
第10题:
有如下函数:Private Function firstfunc(x As Integer, y As Integer) As Integer Dim n As Integer Do While n <= 4 x=x +y n=-+1 Loop firstfunc = x End Function调用该函数的事件过程如下:Private Sub Command1_lick() Dim x As Integer Dim y As Integer Dim n As Integer Dim z As Integer x=1 y=1 For n = 1 To 3 z = firstfunc(x, y) Next n Print z End Sub该事件过程的执行结果是 ______。
A.1
B.3
C.16
D.9