Beginner Swift
Q34 / 100

What is Swift's switch statement requirement?

Correct! Well done.

Incorrect.

The correct answer is B) Every switch must be exhaustive — it must cover all possible values or have a default

B

Correct Answer

Every switch must be exhaustive — it must cover all possible values or have a default

Explanation

Swift switch must be exhaustive. When switching over an enum, each case must be handled. No implicit fall-through (use fallthrough explicitly if needed).

Progress
34/100