What will be in text, if Intid contains 2? Select Case Intid Case 1 Text=”Jannet” Case 2 to 4 Text=”Mark” Case 5, 7 Text=”Jerry” Case Else Text=”Sue” End Select

Jannet
Mark
Jerry
Sue

The correct answer is B. Mark.

The Select Case statement is used to select one of several statements to execute based on the value of an expression. In this case, the expression is Intid. The Case statements are evaluated in order, and the first Case statement that matches the value of Intid is executed. In this case, the value of Intid is 2, which matches the Case statement Case 2 to 4. Therefore, the statement Text=”Mark” is executed, and the value of Text is set to “Mark”.

The other options are incorrect because they do not match the value of Intid. Option A, Jannet, is incorrect because the value of Intid is not 1. Option C, Jerry, is incorrect because the value of Intid is not 5 or 7. Option D, Sue, is incorrect because the value of Intid is not any of the values listed in the Case statements.

Exit mobile version