C ++ Primer learning notes (5) - statement

xiaoxiao2021-03-06  41

Chapter 5 statement

1. Learning to read the statement in the expression, it feels that there is nothing to look, only take a few statements.

2. The ELSE statement is always matched with the last event that is matched.

3. When you encounter a BREAK statement, the Switch statement is terminated, and the control is transferred to the statement followed by the end of Switch ends. (Don't want to be of course at this point)

4. For and the While cycle first conditions true value test, this means that these two loops can be terminated without being executed in the relevant statement or statement blocks; the third loop structure DO-WHILE cycle guarantee statement Or the statement is executed at least once, and the condition test is performed after these statements are executed.

5. BREAK statement terminates the nearest While, Do While, For or Switch statement, the execution of the program is passed to the statement following the termination statement.

6. Continue statement causes the current iteration of the nearest cycle statement, and the execution rights are passed to the conditional calculation section, unlike the BREAK statement to terminate the entire loop, the Continue statement only terminates the current iteration.

转载请注明原文地址:https://www.9cbs.com/read-53694.html

New Post(0)