Question Detail

COM 101 COM 101 Past Questions Objective Question

Question

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

Option C is the correct answer.

Detailed Explanation

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

Hint

Look for correct use of comparison operators and logical operators.

Question Info