What will be the content of Text after the code is executed with id=8? If id==1 Then Text=”Janet”; Elseif id==2 OrElse id==3 Then Text=”Mark” ElseIF id==4 Then Text=”Jerry” Else Text=”Sue “; EndIf

Janet
Mark
Jerry
Sue

The correct answer is D. Sue.

The code will first check if id is equal to 1. If it is, then Text will be set to “Janet”. If it is not equal to 1, then the code will check if id is equal to 2 or 3. If it is, then Text will be set to “Mark”. If it is not equal to 2 or 3, then the code will check if id is equal to 4. If it is, then Text will be set to “Jerry”. If it is not equal to any of 1, 2, 3, or 4, then Text will be set to “Sue”.

In this case, id is equal to 8, which is not equal to 1, 2, 3, or 4. Therefore, Text will be set to “Sue”.

Exit mobile version