网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
下列各语句中,正确的是
A) Dim x As Variant=Array(1, 2,3, 4. 5)
B)Dim xo As Integer: x=Array (1, 2:3: 4.5)
C)Dim x As ariant: x=Array(1: abc: 2,3. 41)
D) Dim x As Integer: x=Arra (1, 2, 3+25)
参考答案
更多 “ 下列各语句中,正确的是A) Dim x As Variant=Array(1, 2,3, 4. 5)B)Dim xo As Integer: x=Array (1, 2:3: 4.5)C)Dim x As ariant: x=Array(1: abc: 2,3. 41)D) Dim x As Integer: x=Arra (1, 2, 3+25) ” 相关考题
考题
( 31 )下列数组声明语句中,正确的是A ) dim A[3,4] As integerB ) dim A(3,4) As integerC ) dim A[3;4] As integerD ) dim A(3;4) As integer
考题
下列程序段的执行结果为 ______。 Dim m(3,3)As Integer Dim i As Integer Dim j As Integer Dim x As Integer For i=1 To 3 m(i,i)=i Next For i=0 To 3 For j=0 To 3 x=x+m(i,j) Next Next Print xA.3B.4C.5D.6
考题
下面的语句用Array函数为数组变量a的各元素赋整数值:a=Array(1,2,3,4,5,6,7,8,9)针对a的声明语句应该是A.Dim aB.Dim a As IntegerC.Dim a(9) As IntegerD.Dim a() As Integer
考题
(25)下列程序段错误的是。A.Dim a As Integer a=array(1,2,3,4) B.Dim a(),b() a=array(1,2,3,4):b=a C.Dim a As Variant a=array(1,"asd",true) D.Dim a() As Variant a=array(1,2,3,4)
考题
在窗体上画一个名称为Text1 的文本框和一个名称为Command1 的命令按钮,然后编写如下事件过程: Private Sub Commandl1_Click( ) Dim array1 ( 10, 10) As Integer Dim i,j As Integer For i=1 To 3 For j = 2 To 4 Array1 (i, j) =i +j Next j Next i Text1.Text=array1(2.3) + array1(3.4) End Sub程序运行后,单击命令按钮,在文本框中为示的值是( )。A.12B.13C.14D.15
考题
以下定义数组或给数组元素赋值的语句中,正确的是A.Dim a As Variant a=Array(1,2,3,4,5)B.Dim a (10) As Integer a=Array(1,2,3,4,5)C.Dim a%(10) a(1)="ABCDE"D.Dim a (3),b(3) As Integer a(0)=0 a(1)=1 a(2)=2 b=a
考题
下面的语句用 Array函数组变量a的各元素赋整数值: a=Array(1,2,3.4,5,6,7,8,9) 针对a的声名语句应该是( )。A.Dim aB.Dim a As IntegerC.Dim a(9)As IntegerD.Dim a( )As Integer
考题
以下定义数组或给数组元素赋值的语句中,正确的是A.Dim x%(2) x(1)="等级考试"B.Dim x(3), y(3)As Integer x(0)=1:y=xC.Dim x x=Array(0,1,2)D.Dim x(3)As Integer x=Array(0,1,2)
考题
有下列程序: Option Base 0 Private Sub Command1_Click() Dim City As Variant x = Array("Visual","Basic","Microsoft","Programming") Print x(2) End Sub 程序运行后,单击命令按钮,则在窗体上显示的内容是A.MicrosonB.错误提示C.VisualD.Basic
考题
下列数组定义语句中,错误的是( )。A.Static a(10) As IntegerB.Dim c(3,1 To 4)C.Dim d(-10)D.Dim b(0 To 5,1 To 3)As Integer
考题
设有如下程序: Private Sub search(a()As Variant,ByVal key As Variant,index%) Dim I% For I = Lbound(a)To Ubound(A)If key=a(I)Then index=I Exit Sub End If Next I index=-1 End Sub Private Sub Form_Load() Show Dim b()As Variant Dim n As Integer b=Array(21,64,92,15,72,38,45,72) Call search(b, 45, n) Print n End Sub 程序运行后,输出的结果是A.2B.6C.10D.12
考题
下面的语句用Array函数为数组a的各元素赋整数值: a=Array(1,2,3,4,5,6,7,8,9) 对数组变量a的正确定义是A.Dim aB.Dim a As IntegerC.Dim a(9) As IntegerD.Dim a() As IntegEr
考题
有如下函数: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.1B.3C.16D.9
考题
编写如下事件过程: Option Base 1 Private Sub Form Click() Dim x1()As Integer Dim i As Integer Dim s As Integer ReDim x1(3) For i = 1 To UBound(x1) x1(i)=i + 1 Next i Call sub1(x1) For i = 1 To UBound(x1) s = s + x1(i) Next i Print s End Sub Private Sub sub1(n()As Integer) Dim i As Integer ReDim Preserve n(5) For i = 3 To 5 n(i)=n(i-1)*2 Next i End Sub 程序运行后,单击窗体,则窗体上显示的内容是A.6B.12C.24D.47
考题
以下定义数组或给数组元素赋值的语句中,正确的是A. Dim a As Variant a=Array(1,2,3,4,5)B.Dim a(10) As Integera =Array(1,2,3,4,5)C.Dim a%(10) a(1)="ABCDE"D.Dim a(3),b(3) As Integer a(0)=0 a(1)=1 a(2)=2 b=a
考题
针对下面程序段,边界值问题可以定位在(62)1:Rem Crege a 10 element integer array2:Rem Initialize each element to -13:Dim data(10) As Integer4:Dim i As Integer5:For i=1 TO 106:data(i)=-17:Next i8:EndA.data(1)B.data(0)C.data(9)D.data(10)
考题
下列数组说明语句正确的是A.Dim g(0,-5)As SingleB.Dim h(100 To 100,100)As StringC.Dim x(5)As Integer ReDim x(10)As IntegerD.Dim y() ReDim y
考题
下列程序运行后会出现错误的提示为 Private Sub Command1_Click() Dim i AS Integer Dim x x=Array(2,3, 4, 5, 6, 7) For Each i In x Print i; Next i End SubA.数组的下标超界B.For Each数组的控制变量必须为变体变量C.关键字Each的位子不对D.x应该定义成数组
考题
在窗体上画一个名称为Text1的文本框和一个名称为Command1的命令按钮,然后编写.如下事件过程: Private Sub Command1_Click() Dim array1(10,10)As Integer Dim i As Integer, j As Integer For i=1 To 3 For j=2 To 4 array1(i,j)=i+j Next j Next i Text1.Text=array1(2,3)+arrayl(3,4) End Sub 程序运行后,单击命令按钮,在文本框中显示的值是______。A.12B.13C.14D.15
考题
下列程序段的执行结果为______。 Dim m(3,3)As Integer Dim i As Integer Dim j As Integer Dim x As Integer For i=1 To 3 m(i,i)=i Next For i=0 T0 3 For j=0 To 3 x=x+m(i, j) Next Next Print xA.3B.4C.5D.6
考题
以下哪个选项定义了10个整型数构成的数组,数组元素为NewArray(1)至NewArray(10)A.Dim NewArray (10)As IntegerB.Dim NewArray(1 To 10)As IntegerC.Dim New Array(10)IntegerD.Dim NewArray(1 To 10)Integer
考题
下列程序段的执行结果为 ______。 Dim m(3,3)As Integer Dim i As Integer Dim j As Integer Dim K As Integer For i=1 To 3 m(i,i)=i Next For i=0 To 3 For j=0 To 3 x=x+m(i,j) Next Next Print xA.3B.4C.5D.6
考题
以下定义数组或给数组元素赋值的语句中,正确的是( )。A.Dim a As Varianta=Array(1,2,3,4,5)B.Dim a(10) As Integera=Array(1,2,3,4,5)C.Dim a%(10)a(1)="ABCDE"D.Dim a(3),b(3) As Integera(0)=0a(1)=1a(2)=2b=a
考题
下述代码A和B正确的值是() Dim X As String = "123" Dim Y As Integer = 123 Dim A As String = X + Y Dim B As String = X YA“246”,“123123”B246,“123123”C“123123”,“123123”D123123,“123123”
考题
在VB中,使用变量前一般应对变量进行定义。以下变量定义语句错误的是()。A、Dim x As IntegerB、Dim x As Integer,y As SingleC、Var x,y:IntegerD、Dim x As Integer,y As Integer
考题
下述代码A和B正确的值是() Dim X As String = "123" Dim Y As Integer = 123 Dim A As String = X + Y Dim B As String = X YA、“246”,“123123”B、246,“123123”C、“123123”,“123123”D、123123,“123123”
考题
以下声明语句中错误的是()。A、Const var1=123B、Dim var2=’ABC’C、Dim x_y_z%D、Static var3 As Integer
热门标签
最新试卷