已定义数组dim a(5) as integer,函数ubound(a())的值为________,lbound(a())的值为________
5 0
举一反三
- 有如下程序: Const N=-5 Const M=6 Dim a(N To M)As Integer For i=LBound(a)To UBound(a) a(i)= i Next i Print a(LBound(a));a(UBound(a)) 运行后,输出结果为( )。
- 下面的语句用Array函数为数组a的各元素赋整数值: a=Array(1,2,3,4,5,6,7,8,9) 对数组变量a的正确定义是 A: A) Dim a B: B) Dim a As Integer C: C) Dim a(9) As Integer D: D) Dim a() As IntegEr
- 以下定义数组的语句中,正确的是______。 A: Dim a( ,) as Integer B: Dim a(5 To 1) As Integer C: Dim a(-3 To 2000) As Single D: Dim a(n) As Double
- 下列数组声明语句中,正确的是( )。 A: Dim A[5,8]As Integer B: Dim A(5,8)As Integer C: Dim A[5;8]As Integer D: Dim A(5;8)As Integer
- 以下程序输出的结果是: Private Sub Form_Activate() Dim a a=Array(1,2,3,4,5) For i=Lbound(((A) To Ubound(((A) A(i)=i*a(i) Next i Print i, Lbound(((A) , Ubound(((A) , a(i) End Sub
内容
- 0
以个哪个选项定义了10个整形数构成的数组,数组元素为Array(1)至Array(10)?( ) A: Dim Array(10) As Integer B: Dim Array(10) Integer C: Dim Array(1 to 10) As Integer D: Dim Array(1 to 10) Integer
- 1
用语句Dim A (-3 To 5) As Integer定义的数组的元素个数是().
- 2
中国大学MOOC: 若有数组说明语句:Dim a()AS Integer,则a被定义为_______。
- 3
a(LBound(a))和a(UBound(a))的值分别是_______.Dima(-1To6)Fori=LBound(a)ToUBound(a)a(i)=iNexti A: 00 B: -50 C: -16 D: 06
- 4
若要引用某数组x的数组元素,该元素的下标为i,则i的取值范围为[Ubound(x),Lbound(x)]