C++ ch.5

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Single-alternative selection structure

A selection structure that requires a special set of actions to be taken only when the structure's condition is true

Local variable

A variable declared within a statement block; can be used only by the instructions within the statement block in which it is declared, and the instructions must appear after its declaration statement

Argument

An item that appears between the parentheses that follow a function's name; represents information that the function needs to perform its task

Boolean operators

Another term for logical operators

False path

Contains the instructions to be processed when a dual-alternative selection structure's condition evaluates to false

True path

Contains the instructions to be processed when a selection structure's condition evaluates to true

Selection structure

One of the three control structures; tells the computer to make a decision before selecting the next instruction to process; also called the decision structure

Statement block

Oneor more instructions enclosed in a set of braces ({})

Logical operators

Operators used to combine two or more sub-conditions into one compound condition; also called Boolean operators

Comparison operators

Operators used to compare values having the same data type in an expression; also called relational operators; <. <=, >, >=, ==, !=

Dual-alternative selection structures

Selection structures that require two sets of actions: one to be taken only when the structure's condition is true, and the other only when the condition is false

Truth tables

Tables that summarize how the computer evaluates the logical operators in an expression

tolower function

Temporarily converts a character to lowercase

Decision Symbol

The diamond in a flowchart; used to represent the condition in either a selection or repetition structure

setprecision stream manipulator

The manipulator used to control the number of decimal places that appear when a real number is displayed

scientific stream manipulator

The manipulator used to display real numbers in scientific (e) notation

Data Validation

The process of verifying that a program's input data is within the expected range

Short-circuit evaluation

refers to the way the computer evaluates two sub-conditions connected by a logical operator; when the logical operator is And, the computer does not evaluate sub-condition2 when sub-condition1 is false; when the logical operator is Or, the computer does not evaluate sub-condition2 when sub-condition1 is true

toupper function

temporarily converts a character to uppercase

fixed stream manipulator

the manipulator used to display real numbers in fixed-point notation


Set pelajaran terkait

WGU D053-Contemporary Topics and the Influence on Healthcare Today

View Set

8.3.10 Wireless Defenses Section Quiz

View Set

Chapter 19: Nursing Management of Pregnancy at Risk: Pregnancy-Related Complications

View Set

InterComm Ch. 9-12 - Quiz Questions & Material

View Set

PSYCH- issues and debates, free will vs determinism & nature vs nurture

View Set