Module 3 Flashcards
A value used on either side of an operator.
OPERAND
For example, 25 + 2, the numbers 25 and 2 are _______.
OPERANDS
Require two operands.
BINARY OPERATOR
Used with two integer constants or integer variables.
The result is an integer with the value of the remainder after division takes place
REMAINDER/MODULUS OPERATOR
TWO TYPES OF DIVISION
- INTEGER DIVISION
2. FLOATING-POINT DIVISION
Involves integer constants or integer variables.
The result is an integer.
Any fractional part of the result is lost.
INTEGER DIVISION
Involves when either or both of the operands are floating-point values.
The result is double.
FLOATING-POINT DIVISION
The associativity of an operator controls the order of evaluation of expressions involving the same operator, for example: 3 / 4 / 5.
OPERATOR ASSOCIATIVITY
Associativity can be:
- LEFT-TO-RIGHT
2. RIGHT-TO-LEFT
the leftmost operator is applied first.
LEFT-TO-RIGHT
the rightmost operator is applied first.
RIGHT-TO-LEFT
controls the order of evaluation of operators.
OPERATOR PRECEDENCE
A ______________ means an operator is evaluated (applied) before any lower precedence operators.
HIGH PRECEDENCE
The type to which all operands in an expression are converted for compatibility.
UNIFYING TYPE
Place desired result type in parentheses.
CAST OPERATOR