Chapter 4 | Logical Operators

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

block

A variable with __________ scope is only visible when the program is executing in the block containing the variable's definition.

True

Assume the variables x = 5, y = 6, and z = 8. Indicate by circling the T or F whether each of the following conditions is true or false: 2 != y && z != 4

True

Assume the variables x = 5, y = 6, and z = 8. Indicate by circling the T or F whether each of the following conditions is true or false: x == 5 | | y > 3

curly braces

For an if statement to conditionally execute a group of statements, the statements must be enclosed in a set of __________.

and [&&]

If the sub-expression on the left of the __________ logical operator is false, the right sub-expression is not checked.

False

The = operator and the == operator perform the same operation when used in a Boolean expression.

not [!]

The __________ logical operator has higher precedence than the other logical operators.

and [&&]

The __________ logical operator works best when testing a number to determine if it is within a range.

integer constant

The expression following a case statement must be a(n) ____________________.

False

x >= y is the same as (x > y && x = y)

False

A conditionally executed statement should be indented one level from the if statement.

True , False

A relational expression is either ______ or ________.

False

It's safe to assume that all uninitialized variables automatically start with 0 as their value.

True

The scope of a variable is limited to the block in which it is defined.

default

The trailing else in an if/else if statement has a similar purpose as the __________ section of a switch statement.


Set pelajaran terkait

Immune System: T-cells and the Immune Response

View Set

JTIDS - 101 (Post Test 1 Lessons)

View Set

Locating and Marking of Facilities NGA 21 Book

View Set

MGMT 2115 Chapter 9 Concept Check

View Set

3-Guide to Computer Forensics and Investigations

View Set

Chemical Equations & Reactions - chpt 8

View Set