Week 3 Flashcards
Data type for logical high and low data values (i.e., true or false)?
Bool
Value 0 evaluates as which Boolean value?
False
Value of anything other than zero evaluates as which Boolean value?
True
Order in which statements are executed in a program is referred to as?
The flow of control
The ordinary flow of control is?
Sequential
A statement used to alter the ordinarily sequential flow of control?
Control structure
An expression used by a control structure to determine the flow of control?
Branching condition
Control structure used to change flow of control between different alternatives?
Selection or branching
A statement of data values compored using logical operators is known as?
Logical expression, or assertion
Characteristics of the bool data type?
It holds only true or false, which are constants, and reserved words
Operators used to compare values in relational expressions are known as?
Relational operators
Relational operator == checks for?
Equality between to values
Relational operator != checks for?
Inequality between two values
Relational operator > checks for?
Greater than relationship
Relational operator < checks for?
Less than relationship
Relational operator => checks for?
Greater than or equal to
Relational operator =< checks for?
Less than or equal to
Chars are logically compared in what way?
Alphabetically, according to ASCII
Mixed type relational expressions are not always safe because?
Of implicit type coercion by the compiler
Bools compared with numerical data types evaluate as?
0 and 1
When comparing strings, one of them must be?
An identified string object as opposed to a literal C string
When comparing nonidentical strings, which string is considered less than the other?
The string where the first nonidentical character in both strings comes earlier in the ASCII table, or whichever is smaller if they match to the end of one of the strings
The fundamental control structure in C++ is?
The if statement
If statements evaluate a relational expression how?
If true else if false