Multiple Choice
Identify the error in the following code:
Private Sub btnCalculate_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnCalculate.Click
' Declare some variables
Dim sngNumber1 As Single
Dim sngNumber2 As Single
Dim sngSum As Single
' Get the two numbers
SngNumber1 = txtNumber1.Text
SngNumber2 = txtNumber2.Text
' Calculate their sngSum... is the next line working?
SngSum = sngNumber1 + sngNumber2
' Display the result
LblSum.Text = sngSum.ToString
End Sub
A) A local variable is misplaced.
B) A conversion function such as CSng was not used.
C) The variable name sngNumberl was misspelled.
D) The variable sngSum was declared as the wrong data type.
Correct Answer:

Verified
Correct Answer:
Verified
Q21: The order in which controls receive the
Q22: The control is used to gather input
Q23: What is the result after evaluating the
Q24: What is the value of dblOutcome after
Q25: What is the value of intE after
Q27: When you assign a value of one
Q28: You can break up a long statement
Q29: Only controls capable of receiving some sort
Q30: You can perform all of the following
Q31: What will be the value of intAnswer