网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
若有如下定义,选项中不正确的语句是_________。 Structure MyStru Dim No as integer Dim Gender As Char End Structure Dim s(100) AS MyStru
A.MyStru是结构变量
B.s是结构数组
C.s(0).No=1234是正确的赋值语句
D.Gender是结构中的一个成员
E.s(1)是数组中的一个元素
参考答案和解析
int y[5]={0,1,3,5,7,9};
更多 “若有如下定义,选项中不正确的语句是_________。 Structure MyStru Dim No as integer Dim Gender As Char End Structure Dim s(100) AS MyStruA.MyStru是结构变量B.s是结构数组C.s(0).No=1234是正确的赋值语句D.Gender是结构中的一个成员E.s(1)是数组中的一个元素” 相关考题
考题
( 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
考题
下面可以正确定义2个整形变量和1个字符串变量的语句的是( )。A.Dim n,m AS Interger,s AS StringB.Dim a%,b$,c AS StringC.Dim a AS Integer,b,c AS StringD.Dim x%,y AS Integer,z AS String
考题
下面可以正确定义两个整型变量和—个字符串变量的语句是______。A.Dim n,m As Integer,s As StringB.Dim a%,b$,c As StringC.Dim a As Integer,b,c As StringD.Dim x%,y As Integer,z As String
考题
( 11 )下面可以正确定义 2 个整形变量和 1 个字符串变量的语句的是( )A ) Dim n,m AS Interger,s AS StringB ) Dim a%,b$,c AS StringC ) Dim a AS Integer,b,c AS StringD ) Dim x%,y AS Integer,z AS String
考题
设有如下的用户定义类型: 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="李明"
考题
定义有5个整数型元素的数组,正确的语句是A.Dim a(4) As IntegerB.Option Base 1:Dim a(5)C.Dim a (5)D.Dime a(5) As Integer
考题
如下数组声明语句,正确的是( )。A. Dim a[3, 4] As IntegerB. Dim a(34) As IntegerC. Dim a(n,n) As IntegerD. Dim a(3,4) As Integer
考题
设有如下的记录类型: 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="张红"
考题
以下有关数组定义的语句序列中,错误的是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.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
考题
下列数组定义语句错误的是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)
考题
有如下函数过程: Function lj(x As Integer) As Long Dim s As Long Dim i As Integer s=0 For i = 1 To x s=s+ i Next i 1j= s End Function在窗体上添加一个命令按钮,名为Command1, 编写事件过程调用该函数: Private Sub Command1 Click() Dim i As Integer Dim sum As Long For i = 1 To 5 sum = sum + 1j(i) Next i Print sum End SubA. 25B.35C.45D.55
考题
有如下一个Sub过程: Sub mlt(ParamArray numbers()) n=1 For Each x In numbers n=n*x Next x Print n End Sub 在一个事件过程中如下调用该Sub过程: Private Sub Command1_Click() Dim a As Integer Dim b As Integer Dim c As Integer Dim d As Integer a=1 b=2 c=3 d=4 mlt a,b,c,d End Sub 该程序的运行结果为( )。A.12B.24C.36D.48
考题
有如下函数: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
考题
有如下一个Sub过程: Sub mlt (ParamArray numbers()) n=1 For Each x In numbers n=n * x Next x Print n End Sub在一个事件过程中如下调用该Sub过程: Private Sub Coinmand1_Click() Dim a As Integer Dim b As Integer Dim c As Integer Dim d As Integer a=1 b=2 c=3 d=4 mlt a,b,c,d End Sub 则运行该程序,结果为______。A.12B.24C.36D.48
考题
有如下函数过程: Function gys(ByVal x As Integer,ByVal y As Integer) As Integer Do While y<>0 reminder = x Mod y x=y y=reminder Loop gys=x End Function以下是调用该函数的事件过程,该程序的运行结果是______。 Private Sub Command7_Click() Dim s As Integer Dim b As Integer a=100 b=25 x=gys(a,B)Print x End SubA. 0B.25C.50D.100
考题
下列数组说明语句正确的是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
考题
以下将变量NewVar定义为Integer型正确的是______。A.Integer NewVarB.Dim NewVar Of IntegerC.Dim NewVar As IntegerD.Dim Integer NewVar
考题
以下有关数组定义的语句序列中,错误的是( )。A.Static arr1(3) arr1(1)=100 arr1(2)="Hello" arr1(3)=123.45B.Dim arr2() AsInteger Dim size As Integer Private Sub Command2_Click () size=InputBox("输入:") ReDim arr2(size) …… EndSubC.Option Base 1 Private Sub Command3 Click() Dim art3(3) As Integer …… End SubD.Dim n As Integer Private Sub Command4 Cliok() Dim arr4(n)As Integer …… End Sub
考题
在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、Dim a[3,4] As IntegerB、Dim a(3 4) As IntegerC、Dim a(n,n) As IntegerD、Dim a(3,4) As Integer
考题
在VBA中要定义一个100元素的个整型数组,正确的语句是()A、Dim NewArray(100)AsIntegerB、Dim NewArray(2 To 101)AsIntegerC、Dim NewArray(2 To 101)D、Dim NewArray(100)
考题
如下数组声明语句,正确的是()。A、Dim a[3,4] as IntegerB、Dim a(3,4)as IntegerC、Dim a(n,n)as IntegerD、Dim a[3][4]as Integer
热门标签
最新试卷