Multiple choice technology programming languages

The statement that is used to replace multiple if statements is called?

  1. The switch & case statement

  2. ?: (ternary operator)

  3. The #endif statement

  4. The nestedif statement

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

The switch and case statement provides a clean control structure to select and execute one of many blocks of code, acting as an alternative to long, chained if-else statements. Ternary operators and preprocessor directives do not serve this purpose.