ENGN132 - Chapter 4 Flashcards
Key Terms Chapter 4
What is a Control Structure?
A combination of individual instructions to a single logical unit with one entry point and one exit point.
What is a Compound Statement?
A group of statements bracketed by { and } that are executed sequentially.
Define a Selection Control Structure
A control Structure that chooses among alternative program statements.
What is a Condition?
An expression that is either false (represented by 0) or true (usually represented by 1)
What is a Logical Expression?
An expression that uses more of the logical operators
&& (and)
| | (or)
! (not)
Define Logical Complement (Negation)
The complement of a condition that has the value 1 (true) when the condition’s value is 0 (false); the complement of a condition has the value 0 (false) when the conditions value is non-zero (true)
What is a Unary Operator?
An operator using only one operand
Define Short-Circuit Evaluation
Stopping evaluation of a logical expression as soon as its value can be determined
Define Flowchart
A diagram that shows the step-by-step execution of a control structure
What is a Hand Trace/Desk Check?
Step-By-Step simulation of an algorithm’s execution
Define Decision Step
An algorithm step that selects on of several actions.
Define Pseudocode
A combination of English phrases an C constructs to describe algorithm steps
What is a Cohesive Function?
A function that performs a single operation
Define a Nested If Statement
An if statement with another if statement as its true task or its false task.