3. Branches Flashcards

1
Q

In a program, a ____ is a sequence of statements only executed under a certain condition.

A

branch

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A decision and its two branches are often called ____ branches.

A

if-else

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

A(n) ____ operator checks whether two operands are the same (==) or different (!=).

A

equality

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

An expression involving an equality operator evaluates to a ____ value.

A

Boolean

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

A(n) ____ operator checks how one operand’s value relates to another, like being greater than.

A

relational

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

True or false: floating-point types should not be compared using the equality operator (==), due to the imprecise representation of floating-point numbers.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Pressing Enter or Return creates what character?

A

The newline character (/n)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the precedence rules for arithmetic, logical, and relational operators?

A

Parentheses
Logical not
Arithmetic operators (using their precedence rules)
Relational operators
Equality and inequality operators
Logical and
Logical or

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

The difference threshold indicating that floating-point numbers are equal is often called the ____.

A

epsilon

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a common value for epsilon?

A

0.0001

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

The part of the 32-bit floating-point representation that contains its significant digits is called the ____ or the ____.

A

mantissa, significand

How well did you know this?
1
Not at all
2
3
4
5
Perfectly