首页/ 题库 / [单选题]已知数组a(1 To 10)As Int的答案

已知数组a(1 To 10)As Integer,下面调用GetValue函数正确的是( )。 Private Function GetValue(a()As Integer)As Integer For i=1 To 10 Get Value=GetValue+a(i) Next i End Function

单选题
2022-02-21 16:56
A、S=GetValue(a(1 To 10))
B、S=GetValue(a)
C、S=GetValue(a(10))
D、S=GetValue a
查看答案

正确答案
B

试题解析

标签:
感兴趣题目
已知数组a(1 To 10)As Integer,下面调用GetValue函数正确的是( )。 Private Function GetValue(a()As Integer)As Integer For i=1 To 10 Get Value=GetValue+a(i) Next i End Function
在窗体上画一个名称为Connand1的命令按钮,然后编写如下程序: Private Sub Command1_Click() Dim i As Integer, j As Integer Dim a(10, 10) As Integer For i = 1 To 3 For j = 1 To 3 a(i, j) = (i - 1) * 3 + j Print a(i, j); Next j Print Next i End Sub程序运行后,单击命令按钮,窗体上显示的是______。
在窗体上画一个名称为Commandl的命令按钮,然后编写如下程序: Private Sub Command1_Click() Dim i As Integer,j As Integer Dim a(10, 10)As Integer For i=1 To 3 For i=1 To 3 a(i,j)=(i-1) *3+j Print a(i,j); Next i Print Next i End Sub 程序运行后,单击命令按钮,窗体上显示的是
有以下函数过程: 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 Command1_Click() Dim a As Integer Dim b As Integer a = 50 b = 10 x=Gys (a,B)Print x End Sub
有如下函数过程: Function Fun(By Val x As Integer,By Val y As Integer)As Integer Do While Y<>0 reminder=x Mod y x=y y=reminder Loop Fun=x End Function 以下调用函数的事件过程,该程序的运行结果是 Private Sub Command7_Click() Dim a As Integer,b As Integer a=100:b=25 x=Fun(a,B) Print x End Sub
有如下函数过程: Function HFC(ByVal x AS Integer,ByVal y As Integer)As Integer Do While y < > 0 sic=x/y X=y y=sic Loop HFC=x End Function 以下是该函数的调用过程,该程序的运行结果是 Private Sub Command1 _ Click( ) Dim a AS Integer Dim b As Integer a=12 b=2 x=HFC(a,B)Print x End Sub
有如下函数过程: Function Fun (By Val x As Ingeger, ByVal y As Integer)As Integer Do While…y<>0 reminder=x Mod y x=y y=reminder Loop Fun=x End Function 以下是调用该函数的事件过程,该程序的运行结果是 Private Sub Command1_Click() Dim a As Integer Dim b As Integer a=100:b=25 x=Fun(a,b)Print x End Sub
有如下函数过程: Function Fun(By Val x As Ingeger,ByVal y As Integer)As Integer Do While…Y<>0 reminder=x Mod Y x=y y=reminder Loop Fun=X End Function 以下是调用该函数的事件过程,该程序的运行结果是 Private Sub Command1_Click() Dim a As Integer Dim b As Integer a=100:b=25 x=Fun(a,b) Print x End Sub
已知有如下数组定义
Dim a(-3 To 6, 5, 3 To 10) As Integer
则执行语句Print LBound(a, 2); UBound(a, 2),输出的值为______。
假定一个函数的原型语句为“intff(int* x);”,一个整型数组为a[10],则下面函数调用表达式不正确的是()。
某人编写了一个能够返回数组a中10个数中最大数的函数过程,代码如下: Function MaxValue(aAsInteger)As Integer Dim max%:max=1 For k=2 TO 10 If a(k)>a(max)Then max=k End lf Next k MaxValue=max End Function 程序运行时,发现函数过程的返回值是错的,需要修改,下面的修改方案中正确的是。 A.语句max=1应改为max=a(1) B.语句For k=2 TO 10应改为For k=1 TO 10 C.If语句中的条件a(k)>a(max)应改为a(k)>max D.语句MaxValue=max应改为MaxValue=a(max)
以下程序段的执行结果是 ______。 Dim a As Integer,b As Integer For a=4 To 1 Step-1 b=b+a Next a Print b, a
相关题目
已知有如下数组定义Dim a(-3 To 6, 5, 3 To 10) As Integer则执行语句Print LBound(a, 2); UBound(a, 2),输出的值为______。
已有如下数组定义和f函数调用语句,则在f函数的说明中,对形参数组array的正确定义方式为int a[3][4];f(a);
针对下面程序段,边界值问题可以定位在___(62)___。1:Rem Create a 10 element integer array2:Rem lnitialize each element to -13:Dim data(10) As Integer4:Dim i As Integer5:For i=1 TO 106:data(i)=-17:Next i8:End(62)
单击一次命令按钮之后,下列程序段的执行结果为( )。 Pubic Sub Proc(a()As Integer) Static i As Integer Do a(i)=a(i)+a(i+1) i=i+1 Loop While i<2 End Sub Private Sub Command1_Click() Dim m As Integer,i As Integer,x(10)As Integer For i=0 To 4:x(i)=i+1:Next i For i=1 To 2:CallProc(x()):Next i For i=0 To 4:Print x(i);Next i End Sub
单击一次命令按钮之后,下更程序代码的执行结果为______ 。 Public Sub Proc(a() As Integer) Static i As Integer Do a(i) = a(i) + a(i + 1) i=i+1 Loop While i < 2 End Sub Private Sub Command1_Cliek() Dim m As Integer Dim i As Integer Dim x(10) As Integer For i = 0 To 4 x(i) = i + 1 Next i For i = 1 To 2 Call Proc (x) Next i For i = 0 To 4 Print x(i); Next i End Sub
下面程序:________Option Base 1Private Sub Command1_Click() Dim a(10),p(3)As Integer Dim i,k As Integer k=5 For i=1 To 10 a(i)=i Next For i=1 To 3 p(i)=a(i*i) Next For i=1 To 3 k=k+p(i)*2 Next Print kEnd Sub运行后的输出结果为________。
已知函数定义Functionf(x1%,x2%)as integer,则下列调用语句正确的是()
已知有下面过程: Private Sub proc1(a As Integer,b As String,Optional x As Boolean) ...... End Sub 正确调用此过程的语句是______。
已知有下面的过程Private Sub proc1(a As Integer,b As String,Optional x As Boolean)……End Sub正确调用此过程的语句是( )。
有过程如下:Sub fact (m As Integer, total As Long) Dim i As Integer total = 1 for i = 1 To m total = total*i Next iEnd Sub调用它的事件过程如下:Private Sub Command1_ Click () Dim tot As Long Dim a As Integer a = Val InputBox (“请输入数据”)) Call fact (a, tot) Print totEnd Sub则输入数据5,运行结果为 ______。
设有以下函数过程Private Function Fun(a()As Integer,b As String)As IntegerEhd Function若已有变量声明:Dim x(5)As Integer,n As Integer,ch As String则下面正确的过程凋用语句是

用下面语句定义的数组的元素个数是()
Dim A (-4 to 6) As Integer

语句Dim a(-3 To 4,3 To 6)As Integer定义的数组元素个数是( )。
( 22 )语句 dim a(-3 to 4,3 to 6)as integer 定义的数组的元素个数是
语句Dim a(-3 To 4, 3 To 6)As Integer定义的数组的元素个数是______。
用下面语句定义的数组元素个数是______。 Dim Arr2(-2 To 6, i To 5) As Integer
用下面的语句定义数组元素的个数为 ______。 Option Base 1 Dim Arr6(-2 to 6, -1 to 5)As Integer
设有数组说明语句:Dim c(10) AS Integer,则下面表示数组c的元素选项中()是错误的。
定义数组语句Dim a(b)As Integer是正确的
用语句Dim A (-3 To 5) As Integer定义的数组的元素个数是()
广告位招租WX:84302438

免费的网站请分享给朋友吧