Multiple choice

The syntax of the switch statement is switch (expression) statement is true when the expression results in

  1. integer

  2. char

  3. float

  4. either int or char

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The switch statement in C requires an expression that evaluates to an integer type. Since characters are stored as integer values (ASCII/Unicode codes), both int and char types are valid. Float is not allowed because it's not an integral type.