CSCE TEST 2

¡Supera tus tareas y exámenes ahora con Quizwiz!

if the sub-expression on the left of the ____ operator is true, the right sub-expression is not checked

||

the ______ logical operator works best when testing a number to determine if it is outside a range

||

a variable with _____ scope is only visible when the program is executing in the block containing the variables definition

local

the if/else if statement is actually a form of the ______ if statement

nested

An expression using greater-than, less-than,greater-than-or equal to, less-than-or equal to, equal, or not-equal to operator is called an _________ expression

relational

a conditonally executed satament should be indented one level from the if statement

true

a variable defined in an inner block may not have the same name a a variable defined in the outer block

true

all lines in a block should be indented one level

true

the if statement regards and expression with a nonzero value as

true

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

true

when an if statement is nested in the if part of another statement, the only time the inner if is executed is hwen the expression of outer if is true

true

you can use the relational operators to compare string objects

true

a relational expression is either _______ or ___________

true false

in an if/else statement, the if part executes its statement or block if the expression is _______ , and the else part executes its statement or block if the expression is _______

true false

the ______ logical operator has higher precedence than the other logical operators

!

if the sub-expression on the left of the ________ logical operator, the right sub-expression is not checked

&&

the ______ logical operator works best when testing a number to determine if it is within a range

&&

you use the ______ operator to determine whether one string object is greater than another string object

>

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

braces

a program will "fall through" a case section if it is missing the _______ statement

break

an expression using the conditional operator is called an _______ expression

conditional

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

default

its safe to assume that all uninitialized variables automatically start with 0 as their value

false

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

false

the if statement regards an expression with the value 0 as

false

when an if statement is nested in the else aprt of another statement as in an if/else if the only time the inner if is executed is when the expression of the outer if is true

false

the value of a relation expression is 0 is the expression is _______ or 1 if the expression is ___________

false true

the expression that is tested by a switch statement must have a ______ value

integer

the expression following a case statement must be an

integer literal or constant

the logical operators have ______ associativity

left to right


Conjuntos de estudio relacionados

Genetics (DMD) Lessons 6-7 Sexual Reproduction and Inheritance

View Set

Tita Exam Study Guide all of the study guides except the last one

View Set

Chapter 30: Abdominal and Genitourinary Injuries Practice Questions

View Set