[單項(xiàng)選擇題] 設(shè)有如下程序: Dption Base 1 Private Sub Command1_Click() Dim a(10)As Integ
2021-07-20
[單項(xiàng)選擇題] 設(shè)有如下程序:
Dption Base 1
Private Sub Command1_Click()
Dim a(10)As Integer
Dim n As Integer
n=InputBox("輸入數(shù)據(jù)")
If n<10 Then
Call GetArray(a, n)
End If
End Sub
Private Sub GetArray(h()As Integer, n As Integer)
Dim c(10)As Integer
j=0
For i=1 To n
b(i)=CInt(Rnd()*100)
If b(i)/2=b(i)2 Then
j=j+1
c(j)=b(i)
End If
Next
print j
Knd Sub
以下敘述中錯(cuò)誤的是______。
A.?dāng)?shù)組b中的偶數(shù)被保存在數(shù)組c中
B.程序運(yùn)行結(jié)束時(shí),在窗體上顯示的是c數(shù)組中元素的個(gè)數(shù)
C.GetArray過(guò)程的參數(shù)n是按值傳送的
D.如果輸入的數(shù)據(jù)大于10,則窗體上不顯示任何信息
正確答案:C解析:[分析]: 在形參中,默認(rèn)的傳送方式為傳地址傳送,所以形參n是按傳地址傳送。正確答案為選項(xiàng)C。
詞條內(nèi)容僅供參考,如果您需要解決具體問(wèn)題
(尤其在法律、醫(yī)學(xué)等領(lǐng)域),建議您咨詢相關(guān)領(lǐng)域?qū)I(yè)人士。