用 Dim c(2 to 5) As Integer 语句定义的数组占用 个字节的内存空间。
相似题目
-
Dim arrInt()as Integer=New Integer(2){0,1,2}
-
Dim arrInt()as Integer=New Integer(2){}
-
语句Dim arr(-3 To 5,2 To 6)As Integer定义的数组元素有()个。
-
设有如下程序: Option Base 0 Private Sub Form_Click() Dim a Dim i As Integer a = Array(1,2,3,4,5,6,7,8,9) For i = 0 To 3 Print a(5 – i); Next End Sub 程序运行后,单击窗体,则在窗体上显示的是()
-
下面程序段是利用For语句给数组a赋值,使a(1)=1,a(2)=3,a(3)=5,……,a(50)=99,则划线处的语句应该是()。 Dim a(1 to 50) As Integer For i=1 To 50 ______Next i
-
用下面语句定义的数组的元素个数是() Dim A (-4 to 6) As Integer
-
下列程序中 s = s + j 语句共执行了______次。Dim s As IntegerDim i As Integer, j As IntegerFor i = 1 To 10 Step 2For j = 1 To 5 Step 2s = s + jNext jNext iPrint s
-
有如下函数过程: Function secproc(x As Integer, y As Integer, z As Integer) secproc = 3 * y + z + 2 * x End Function Private Sub Command1_Click() Dim a As Integer, b As Integer, c As Integer a = 2: b = 3: c = 4 Print secproc(c, b, a) End Sub 该程序的运行结果是( )。
-
有如下函数过程:Function secproc(x As Integer, y As Integer, z As Integer)secproc = 3 * y + z + 2 * xEnd FunctionPrivate Sub Command1_Click()Dim a As Integer, b As Integer, c As Integera = 2: b = 3: c = 4Print secproc(c, b, a)End Sub该程序的运行结果是( )。
-
求1!+2!+……+10!的程序如下: Private Function s(x As Integer) f=1 For i=1 To x f=f*i Next s=f End Function Private Sub Command1_Click() Dim i As Integer Dim y As Long For i=1 To 10 _____________ Next Print y End Sub
-
写输出下面程序的运行结果 _ _。 Dim a() As Integer Private Sub Command1_Click() ReDim a(1 To 5) For i = 1 To 5 a(i) = i Next i ReDim a(1 To 10) For i = 6 To 10 a(i) = 2 * i Next i For i = 1 To 10 Print a(i); Next i End Sub
-
用语句Dim A (-3 To 5) As Integer定义的数组的元素个数是().
-
下列程序的执行结果是 _ ________ __ Dim a(5) As String Dim b As Integer Dim I As Integer For I = 0 To 5 a(I) = I + 1 Print a(I); Next I
-
下面程序运行结果第一行是 ,最后一行是 。 Private Sub Form_Click() Dim I As Integer, J As Integer, X(4, 3) As Integer For I = 1 To 3 For J = 1 To 2 X(I, J) = I + J Print X(I, J); Next j Print Next i Print X(I, J) End Sub
-
在Visual Basic 中Dim a ,b,c as integer和Dim a as integer, b as integer,c as integer相同。
-
下面程序的功能是找出 100 () Dim i As Integer, j As Integer Dim Sum As Single, c As Single For i=1 To 100 For j=_______________ Sum= i + j C= i – j If___________________________Then Print " 自然数对为: "; i , j End If Next j Next i End Sub
-
在窗体上画一个名称为Text1的文本框和一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim array1(10,10) As Integer Dim i,j As Integer For i=1 To 3 For j=2 To 4
-
设有以下函数过程: Function fun(a As Integer,b As Integer) Dim c As Integer If a<b The
-
有如下程序:Private Sub Form_Click() Dim i As Integer, Sum As Integer sum=0 For i=2 To 10 I
-
语句Dim Arr(-2 To 3)As Integer所定义的数组的元素个数为()。
-
在窗体上画一个名称为Command1的命令按钮,然后编写如下程序代码: Option Base 1 Dim arr() As Integer Private Sub Command1_Click() Dim i As Integer, j As Integer Dim s As Integer ReDim arr(4, 2) s = 0 For i = 1 To 3 For j = 1 To 2 arr(i, j) = i + j Next j Next i ReDim Preserve arr(4, 4) For j = 3 To 4 arr(3, j) = j + 10 Next j For i = 1 To 4 s = s + arr(i, i) Next i Print s End Sub 程序运行过程中,当单击Command1时,输出结果为________。
-
单击命令按钮时,下列程序的执行结果是()。 Private Sub Command1_Click() Dim a As Integer,b As Integer,C As Integer a=3 b=4 c=5 Print SecProc(c,b,a) End Sub Function FirProc (x As Integer,y As Integer,z As Integer) FirProc
-
在窗体上有一个名称为Command1的命令按钮,并有如下事件过程和函数过程: Private Sub Command1_Click() Dim p as Integer p=m(1)+m(2)+m(3) Print p End Sub Private Function m(n As Integer) As Integer Static s As Integer For k=1 To n s=s+1
-
下列程序是将数组a的元素倒序交换,即第1个变为最后一个,第2个变为倒数第2个,设数组中有10个元素。完成下列程序。 Private Sub Backward(a())Dim i As Integer, Tmp As IntegerFor i=1 To 5 Tmp=a(i) ______ ______Next i End Sub
推荐题目
- 下列组织中,哪些不能成为法人()
- 护照持有人申请换发或者补发普通护照,本人只能向户籍所在地的县级以上地方人民政府公安机关出入境管理机构提出。
- 实行()、开展(),着力打造()乡镇供电所。
- 输卵管是卵子进入子宫的通道,管的前1/3段较粗称为壶腹;其余部分较细,称为()。
- 城乡环境综合治理“四个专项行动”是指什么?
- 地蜡的产品牌号是按()划分的。
- ()提出世界大战可以推迟甚至避免,和平与发展成为新的时代主题。
- 目前Rb的治疗说法错误的是()
- 患者带下过少,阴中干涩,阴痒;面色无华,头晕眼花,心悸失眠,神疲乏力,经行腹痛,经色紫暗,有血块,肌肤甲错,舌质暗,边有瘀点瘀斑,脉细涩。其证候是()
- 患者男,30岁。为去除烟斑,要求洁治。刷牙出血不明显,临床检查:大量菌斑、牙石,牙龈红肿不明显,探诊后点状出血,全口牙附着丧失2~3mm。配合临床检查,简便、易行的辅助检查是()