From 07ae8e298564dd87334108ed4c59b61b6679d724 Mon Sep 17 00:00:00 2001 From: owlhoo <35279526+owlhoo@users.noreply.github.com> Date: Mon, 31 Dec 2018 17:54:49 +0100 Subject: [PATCH] Update index.md (#26435) --- guide/english/c/switch/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guide/english/c/switch/index.md b/guide/english/c/switch/index.md index e05549c5f3..07c4834324 100644 --- a/guide/english/c/switch/index.md +++ b/guide/english/c/switch/index.md @@ -8,7 +8,7 @@ The switch statement is like a set of `if statements`. It's a list of possibilities, with an action for each possibility, and an optional default action, in case nothing else evaluates to true. Sometimes we want to compare one input to many booleans and that is when we would prefer to use a switch statement instead of an `if statement`. -We exit from the switch by `break`. If the `break` statement is not reached before the beginning of the next case, the execution will fall through and begin executing the code in the next case. +We exit from the switch by `break`. If the `break` statement is not reached before the beginning of the next case, the execution will fall through and begin executing the code in the next case, which means if you have no break statement in code, when first case is detected to be true, all the other cases below the one that is detected to be true (including itself) will be executed, which is often undesirable. ## Syntax of switch...case