语句Dim arr(-3 To 5,2 To 6)As Integer定义的数组元素有()个。A、45B、40C、11D、54
语句Dim arr(-3 To 5,2 To 6)As Integer定义的数组元素有()个。
- A、45
- B、40
- C、11
- D、54
相关考题:
在窗体上画一个命令按钮Command1,然后编写如下程序:Private Sub Command1_Cliek()Dim arr()As IntegerRe Dim arr(3)For i=0 To 3arr(i)=iNext ix=InputBox("请输入一个数字:")IfVal(x)>4 ThenRc Dim arr(4)arr(4)=xEnd IfMe.Print(arr(4)-arr(3))End Sub程序运行后,单击命令按钮,在输入对话框中输入12,输出结果为【 】。
下列数组定义语句错误的是( )。A.k%=10Dim Arr(k)B.Const k%=10Dim Arr(k)C.Dim Arr1(10) As IntegerDim Arr2 (10)D.Dim Arr1(1 To 10)Dim Arr2(1 To 10, 2 To 11)
阅读程序:Option Base 1Dim arr() As IntegerPrivate Sub Form_Click()Dim i As Integer, j As IntegerReDim arr(3, 2)For i = 1 To 3For j = 1 To 2arr(i, j) = i * 2 + jNext jNext iReDim Preserve arr(3, 4)For j = 3 To 4arr(3, j) = j + 9Next jPrint arr(3, 2) + arr(3, 4)End Sub程序运行后,单击窗体,输入结果为( )。A.21B.13C.8D.25
( 21 )下面正确使用动态数组的是A )Dim arr () As Integer…ReDim arr ( 3 , 5 )B )Dim arr () As Integer…ReDim arr ( 50 ) As StringC )Dim arr ()…ReDim arr ( 50 ) As IntegerD )Dim arr ( 50 ) As Integer…ReDim arr ( 20 )
阅读程序: Private Sub Command1_Click( ) Dim arr Dim i As Integer arr=Array(0,1,2,3,4,5,6,7,8,9,10) For i=0 To 2 Print arr(7-i); Next End Sub 程序运行后,窗体上显示的是( )。A.8 7 6B.7 6 5C.6 5 4D.5 4 3
下面正确使用动态数组的是( )。A.Dim arr( )As Integer … ReDim arr(3,5)B.Dim arr( )As Integer … ReDim arr(50)As StringC.Dim arr( ) … RcDim arr(50)As IntegerD.Dim arr(50)AS Integer … ReDim arr(20)
以下有关数组定义的语句序列中,错误的是A.Static arrl(3) arr1(1)=100 arrl(2)="Hello" arrl(3)=123.45B.Dim arr2()As Integer Dim size As Integer Private Sub Command2_Click() size=InputBOX(“输入:”) ReDim arr2(size) ┄ End SubC.Option Base 1 Private Sub Command3_Click() Dim arr3(3)As Integer ┄ End SubD.Dim n As Integer Private Sub Command4_Click() Dim arr4(n)As Integer ┄ End Sub
以下有关数组定义的语句序列中,错误的是 ______。A.Static arrl(3) arrl(1)=100 arrl(2)="Hello" arrl(3)123.45B.Dim arr2()As Integer Dim size As Integer Private Sub Command2_click() size=InputBox("输入:") ReDimarr2(size) End SubC.Option Base1 Private Sub Command3_click() Dim arr3(3)As Integer End SubD.Dim n As Integer Private Sub Command4_Click() Dim arr4(n)As Integer End Sub
下列数组定义语句错误的是A.k%=10 Dim Arr(k)B.Const k%=10 Dim Arr(k)C.Dim Arrl(10) As Integer Dim Arr2(10)D.Dim Arrl(1 To 10) Dim Arr2(1 To 10,2 To 11)
以下有关数组定义的语句序列中,错误的是 ______。A.Static arr1(3) arr1(1)=100 arr1(2)="Hello" arr1(3)=12345B.Dim arr2()As Integer Dim size As Integer Private Sub Command2_Click() size=Input Box("输入:") ReDimarr2(size) ... End SubC.Option Base 1 Private Sub Command3_Click() Dim arr3(3)As Integer ... End SubD.Dim n As Integer Private Sub Command4_Click() Dim arr4(n)As Integer ... End Sub
用Dim arr(3 To 5,-2 To 2)语句定义的数组元素个数是( )。A.20B.12C.15SXB 用Dim arr(3 To 5,-2 To 2)语句定义的数组元素个数是( )。A.20B.12C.15D.24
在窗体上画一个文本框,然后编写如下程序: Option Base 1 Private Sub Form_Click() Dim Arr(10)As Integer For i=6 To 10 Arr(i)=i-3 Next i Text1.Text:Str(Arr(6)+Arr(Arr(6)+Arr(10))) End Sub 程序运行后,单击窗体,在文本框中显示的内容是A.1B.3C.6D.10
有如下程序: Option Base 1 Private Sub Command1 Click( ) Dim arr(10) arr=Array(10,35,28,90,54,68,72,90) For Eaeh a In arr If a50Then Sum=Sum+a End If Next a End Sub 运行上述程序时出现错误,错误之处是( )。A.数组定义语句不对,应改为Dim arrB.没有指明For循环的终值C.应在For语句之前增加Sum=0D.Next a应改为Next
单选题语句Dim arr(-3 To 5,2 To 6)As Integer定义的数组元素有()个。A45B40C11D54