COMPROG 1 - BASIC OPERATORS AND PRECEDENCE

0.0(0)
Studied by 2 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/16

flashcard set

Earn XP

Description and Tags

midterm reviewer on Computer Programming 1.

17 Terms

1
New cards

Operators

Specific symbols in a programming language that tell the compiler or interpreter to perform a specific mathematical, relational, or logical operation.

2
New cards

Arithmetic Operators

Used to perform basic mathematical operations on numerical values.

3
New cards

Operand

A value used on either side of an operator in an expression.

4
New cards

Relational Operators

Used to evaluate the relation between operands and generate a Boolean value.

5
New cards

Logical Operators

Return a Boolean value based on the Boolean result of given expressions.

6
New cards

Assignment Operators

Used to assign values to variables.

7
New cards

Order of Precedence

Collection of rules that determines the order in which operations are performed in an expression.

8
New cards

Precedence

The priority given to operators when evaluating an expression.

9
New cards

Parentheses

Used to group expressions and override the order of precedence in an expression.

10
New cards

Expression

A construct made up of variables and operators that evaluates to a single value.

11
New cards

Arithmetic expression

An expression that returns a numeric value and consists of arithmetic operators, operands, and assignment operators.

12
New cards

Integral expression

An arithmetic expression where all operands are integers and the expression returns an integer type value.

13
New cards

Floating-point expression

An arithmetic expression where all operands are floating-point numbers and the expression returns a floating-point type value.

14
New cards

Mixed expression

An expression that has operands of different data types and returns a floating-point number.

15
New cards

Rule 1

If the operator has the same types of operands, the operator is evaluated according to the type of the operand.

16
New cards

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.

17
New cards

Logical expression

An expression that returns a Boolean value when evaluated.