Q. In the below switch syntax, the expression is compared with the case labels using which of the following operator(s) ?

Code:
switch(expression)
{
    statements
}
  • (A) ==
  • (B) equals
  • (C) equal
  • (D) ===
πŸ’¬ Discuss
βœ… Correct Answer: (D) ===
Explanation: When a switch executes, it computes the value of expression and then looks for a case label whose expression evaluates to the same value (where sameness is determined by the === operator).
Explanation by: Tanmay
When a switch executes, it computes the value of expression and then looks for a case label whose expression evaluates to the same value (where sameness is determined by the === operator).

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
206
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Tanmay
Publisher
πŸ“ˆ
97%
Success Rate