Question Detail
Question
52. Dim name As String
Dim Grade As Char
Dim Mark As Integer
Mark = 50
Name = "John"
If name <> "John" & Mark = 50 Then
Grade = "A1"
Elseif name = "John" and Mark <> 50 Then
Grade = "B2"
Elseif name = "John" and Mark = 50 Then
Grade = "C4"
End if
What will be the value of Grade at runtime?
Correct Answer
Option D is the correct answer.
Detailed Explanation
Name is 'John' and Mark = 50, so the third condition is true, setting Grade = 'C4'.
Hint
Check which condition matches the variable values.