Filters
Question type

Study Flashcards

The area in a program where a variable can be used is formally referred to as the ____ of the variable.


A) spread
B) block
C) reach
D) scope

E) B) and C)
F) A) and D)

Correct Answer

verifed

verified

An if-else statement without an else part is called a(n) ____________________ if statement.

Correct Answer

verifed

verified

The expression in the switch statement must evaluate to a(n) ____ result or a compilation error results.


A) character
B) boolean
C) integer
D) long

E) B) and C)
F) C) and D)

Correct Answer

verifed

verified

A(n) ____________________ statement is a sequence of single statements between braces.

Correct Answer

verifed

verified

The condition used in an if statement can be any valid C++ expression.

A) True
B) False

Correct Answer

verifed

verified

Including one or more if statements inside an existing if statement is called a ____ if statement.


A) composed
B) complex
C) compound
D) nested

E) All of the above
F) A) and D)

Correct Answer

verifed

verified

If ____________________ statements are omitted in a switch statement, all cases following the matching case value, including the default case, are executed.

Correct Answer

verifed

verified

The ____________________ keyword is optional in a switch statement.

Correct Answer

verifed

verified

Checking user input data for erroneous or unreasonable data is referred to as ____.


A) relational data validation
B) arithmetic data validation
C) output data validation
D) input data validation

E) B) and C)
F) None of the above

Correct Answer

verifed

verified

The relational operator ____ is used to represent the condition less than.


A) >
B) <
C) <=
D) <<

E) All of the above
F) A) and B)

Correct Answer

verifed

verified

B

Using nested if statements without including braces to indicate the structure constitutes a common programming error.

A) True
B) False

Correct Answer

verifed

verified

The switch statement requires you to terminate each case with a break statement.

A) True
B) False

Correct Answer

verifed

verified

Like all C++ expressions, relational expressions are evaluated to yield a(n) ____________________ result.

Correct Answer

verifed

verified

In C++, the logical ____ operator is used to change an expression to its opposite state.


A) AND
B) OR
C) NOT
D) REVERSE

E) B) and D)
F) None of the above

Correct Answer

verifed

verified

C

A ____ relational expression consists of a relational operator that compares two operands.


A) single
B) complex
C) composed
D) simple

E) None of the above
F) C) and D)

Correct Answer

verifed

verified

In C++, strings of characters cannot be compared.

A) True
B) False

Correct Answer

verifed

verified

When the ____________________ logical operator is used with two simple expressions, the condition is true only if both individual expressions are true by themselves.

Correct Answer

verifed

verified

In the switch statement, the ____________________ keyword identifies values that are compared with the switch expression s value.

Correct Answer

verifed

verified

In C++, when comparing character data, the char values are coerced to ____ values automatically for the comparison.


A) bool
B) unsigned int
C) long
D) int

E) B) and C)
F) All of the above

Correct Answer

verifed

verified

D

Including one or more if statements inside an existing if statement is called a(n) ____________________ if statement.

Correct Answer

verifed

verified

Showing 1 - 20 of 51

Related Exams

Show Answer