Solved

If We Were to Call the MakeDouble and ChangeArg Methods

Question 4

Multiple Choice

If we were to call the MakeDouble and ChangeArg methods shown below, using the following statements, what value would be assigned to lblResult.Text?
Dim intValue As Integer = 20
ChangeArg(intValue)
LblResult.Text = MakeDouble(intValue) .ToString()

Function MakeDouble (ByVal intArg As Integer) As Integer
Return intArg * 2
End Function

Sub ChangeArg2(ByRef intArg As Integer)
' Display the value of intArg.
LstOutput.Items.Add(" ")
LstOutput.Items.Add("Inside the ChangeArg procedure, " &
"intArg is " & intArg.ToString() )
LstOutput.Items.Add("I will change the value of intArg.")
' Assign 0 to intArg.
IntArg = 0
' Display the value of intArg.
LstOutput.Items.Add("intArg is now " & intArg.ToString() )
LstOutput.Items.Add(" ")
End Sub


A) 0
B) 20
C) 40
D) (cannot be determined)

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents