[單項選擇題] 單擊命令按鈕時,下列程序的執(zhí)行結(jié)果為( )?! rivate Sub Command1_Click() Dim a As Intege
2021-07-20
[單項選擇題] 單擊命令按鈕時,下列程序的執(zhí)行結(jié)果為( )?! rivate Sub Command1_Click() Dim a As Integer,b As Integer,c As Integer a=2:b=3:C=4 Print P2(c,b,A) End Sub Private Function P1(x As Integer,y As Integer,z As Integer) P1=2 * X + y + 3 * z End Function Private Function P2(x As Integer,y As Integer,z As Integer) P2=P1(z,x,y) + X End Function
A.21
B.19
C.17
D.34
正確答案:A
參考解析:對于多個過程或函數(shù)依次調(diào)用和處理與簡單過程調(diào)用處理一樣,本題先調(diào)用函數(shù)P2,而函數(shù)P2又調(diào)用函數(shù)P1,結(jié)果返回的順序是從P1到P2,P2計算后輸出到調(diào)用的地方。
詞條內(nèi)容僅供參考,如果您需要解決具體問題
(尤其在法律、醫(yī)學等領(lǐng)域),建議您咨詢相關(guān)領(lǐng)域?qū)I(yè)人士。