以下有关数组定义的语句序列中,错误的是______.
A: Staticarr1(3)arr1(1)=100arr1(2)="Hello"arr1(3)=123.45
B: Dimarr2()AsIntegerDimsizeAsIntegerPrivateSubCommand2_Click()size=InputBox("输入:")ReDimarr2(size)……EndSub
C: OptionBase1PrivateSubCommand3_Click()Dimarr3(3)AsInteger……EndSub
D: DimnAsIntegerPrivateSubCommand4_Click()Dimarr4(n)AsInteger……EndSub
A: Staticarr1(3)arr1(1)=100arr1(2)="Hello"arr1(3)=123.45
B: Dimarr2()AsIntegerDimsizeAsIntegerPrivateSubCommand2_Click()size=InputBox("输入:")ReDimarr2(size)……EndSub
C: OptionBase1PrivateSubCommand3_Click()Dimarr3(3)AsInteger……EndSub
D: DimnAsIntegerPrivateSubCommand4_Click()Dimarr4(n)AsInteger……EndSub
举一反三
- 【单选题】执行完以下代码后,数组 arr 的各个元素的取值是什么? int[] arr = {1, 2, 3}; for (int i=0; i < 2; i++) arr[i] = 0; A. arr[0]=0, arr[1]=0, arr[2]=0 B. arr[0]=1, arr[1]=2, arr[2]=3 C. arr[0]=0, arr[1]=0, arr[2]=3 D. arr[0]=0, arr[1]=2, arr[2]=3
- 以下有关数组定义的语句序列中,错误的是( ) A: Static arr1(3) :arr1(1) = "100" : B: arr1(2) = "Hello" :arr1(3) = "123.45" C: Dim arr2( ),size As Integer D: Private Sub Command2_Click( ) E: size =InputBox("输入:") ReDim arr2(size) ...... F: End Sub G: Option Base 1 Private Sub Command3_Click( ) H: Dim arr3(3) As Integer ...... I: End Sub J: Dim n As Integer Private Sub Command4_Click( ) K: Dim arr4(n) As Integer...... L: End Sub
- 以下有关数组定义的语句序列中,错误的是______。 A: Static arr1(3)arr1(1)=100arr1(2)="Hello"arr1(3)=123.45 B: Dim arr2() As IntegerDim size As IntegerPrivate Sub Command2_Click()size=InputBox("输入:")ReDim arr2(size)……End Sub C: Option Base 1Private Sub Command3_Click()Dim arr3(3) As Integer…… End Sub D: Dim n As IntegerPrivate Sub Command4_Click()Dim arr4(n) As Integer……End Sub
- 以下有关数组定义的语句序列中,错误的是 A: Static arr1(3) B: Arr1l(1)=100 C: Arr1(2)=“Hello” D: Arr1(3)=123.45 E: Dim art2( )As Integer F: Dim size As Integer G: Private Sub Command2_Click( ) H: size=Input Box(“输入:”) I: ReDinl.arr2(size) J: …… K: End Sub L: Option Base 1 M: Private Sub Command3_Click( ) N: Dim arr3(3) As Integer O: …… P: End Sub Q: Dim n As Integer R: Private Sub Command4_Click( ) S: Dim arr(n) As Integer T: …… U: End Sub
- 以下有关数组定义的语句序列中,错误的是 A: Static arrl(3) arr1(1)=100 arrl(2)="Hello" arrl(3)=123.45 B: Dim arr2()As Integer Dim size As Integer Private Sub Command2_Click() size=InputBOX(“输入:”) ReDim arr2(size) ┄ End Sub C: Option Base 1 Private Sub Command3_Click() Dim arr3(3)As Integer ┄ End Sub D: Dim n As Integer Private Sub Command4_Click() Dim arr4(n)As Integer ┄ End Sub