1/16
midterm reviewer on Computer Programming 1.
Operators
Specific symbols in a programming language that tell the compiler or interpreter to perform a specific mathematical, relational, or logical operation.
Arithmetic Operators
Used to perform basic mathematical operations on numerical values.
Operand
A value used on either side of an operator in an expression.
Relational Operators
Used to evaluate the relation between operands and generate a Boolean value.
Logical Operators
Return a Boolean value based on the Boolean result of given expressions.
Assignment Operators
Used to assign values to variables.
Order of Precedence
Collection of rules that determines the order in which operations are performed in an expression.
Precedence
The priority given to operators when evaluating an expression.
Parentheses
Used to group expressions and override the order of precedence in an expression.
Expression
A construct made up of variables and operators that evaluates to a single value.
Arithmetic expression
An expression that returns a numeric value and consists of arithmetic operators, operands, and assignment operators.
Integral expression
An arithmetic expression where all operands are integers and the expression returns an integer type value.
Floating-point expression
An arithmetic expression where all operands are floating-point numbers and the expression returns a floating-point type value.
Mixed expression
An expression that has operands of different data types and returns a floating-point number.
Rule 1
If the operator has the same types of operands, the operator is evaluated according to the type of the operand.
Rule 2
If the operator has both types of operands, during calculation, the integer is treated temporarily as a floating-point number, and the final result is a floating-point number.
Logical expression
An expression that returns a Boolean value when evaluated.