1/22
Vocabulary flashcards covering C++ Boolean values, operators, and selection control structures including if, if-else, nested-if, and switch statements.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Boolean Values
The values TRUE (1) or FALSE (0) used in logic.
Relational Operators
A set of 6 binary operations that compare two operands to produce a logical result of TRUE (1) or FALSE (0).
The relational operator meaning 'Less than'.
The relational operator meaning 'Less than or equal'.
>
The relational operator meaning 'Greater'.
=
The relational operator meaning 'Greater than or equal'.
==
The relational operator meaning 'Equal'.
!=
The relational operator meaning 'Not equal'.
Simple Boolean Expressions
An expression in which two numbers (arithmetic values) are compared using a single relational operator.
Logical Operators
Operators in C++ used for combining logical values, including NOT (!), AND (&&), and OR (∣∣).
Logical NOT (!)
A unary operator that changes a TRUE value (non zero) to FALSE (0) and a FALSE value (0) to TRUE (1).
Logical AND (&&)
A binary operator that results in TRUE only if both operands are TRUE; otherwise, it is FALSE.
Logical OR (||)
A binary operator that results in FALSE only if both operands are FALSE; otherwise, it is TRUE.
Logical Priority
The order of evaluation where () is first, followed by !, then arithmetic (∗,/,%, then +,−), then relational operators, then &&, and finally ∣∣.
Selection Structure
A control structure where statements are executed based on conditions formed by Boolean expressions.
One-way Selection (if)
A selection structure where a statement is executed if a condition is TRUE, otherwise it is ignored.
Two-way Selection (if…else)
A structure that makes a decision between two alternatives; one set of statements executes if the condition is TRUE, and another if it is FALSE.
Multi-way Selection
Selection structures such as nested-if or switch statements used to handle multiple alternative conditions.
Nested-if
A structure where an if…else statement is included within another if…else statement.
Compound Statements
A sequence of statements enclosed in curly braces that is treated by C++ as a single statement.
Switch Statements
A composite statement used to make a decision between many alternatives based on integral types.
Break Statement
A statement used within a switch to cause the program to jump out of the switch block.
Default Label
An optional label in a switch statement that executes when none of the case constants match the switch expression.