Question Detail

COM 101 COM 101 Past Questions Objective Question

Question

Which of the following is a valid Visual Basic conditional state
Options
A 2 <n Or <5
B (2 <n) Or (n <5)
Correct Answer
C (2 <n) ^ (n <5)
D 2 <n & 5
Correct Answer

Option B is the correct answer.

Detailed Explanation

In Visual Basic, conditional statements use proper syntax with parentheses and logical operators like 'Or'. Option B shows the correct syntax: (2 < n) Or (n < 5).

Hint

Look for correct use of comparison operators and logical operators.

Question Info