Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

In the following switch syntax, the expression is compared with the case labels using which of the following operator(s)?
switch(expression)
{
statements
}

In the following switch syntax, the expression is compared with the case labels using which of the following operator(s)?
switch(expression)
{
statements
}
a) ==
b) equals
c) equal
d) ===

Answer: d
Explanation: A strict comparison (e.g., ===) is only true if the operands are of the same type and the contents match. When a switch executes, it computes the value of the expression and then looks for a case label whose expression evaluates to the same value (where sameness is determined by the === operator).

Join The Discussion