Monday, July 21, 2014

What will be the output of the following program when the button is clicked?

Private Sub btnDisplay_Click(...) Handles btnDisplay.Click
Dim number As Double = 3
DoubleAndSquare(number)
txtBox.Text = CStr(number)
End Sub
Sub DoubleAndSquare(ByRef myVar As Double)
myVar = myVar + myVar
myVar = myVar * myVar
A. 3
B. 36
C. 6
D. 0

Ans: B


No comments: