Question Detail

COM 101 COM 101 Past Questions Objective Question

Question

17. Given the statement below, which of the options would not result in a run-time error. Dim response as Boolean
Options
A response = "Boolean"
B response = True
Correct Answer
C response = No
D response = 3
Correct Answer

Option B is the correct answer.

Detailed Explanation

A Boolean variable can only hold True or False. Assigning a string, integer, or 'No' (unless it's a defined constant) would cause a type mismatch error.

Hint

Boolean variables only accept True or False.

Question Info