Arithmetic Expressions Flashcards

1
Q

are the fundamental means of specifying computations in a programming language

A

Expressions

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

An arithmetic expression consists of

A

operators, operands, parentheses, and function calls

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

In most programming languages, binary operators are … which means they appear between operands

A

inflix

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

specifies the order of operations in expressions that contain more than one (1) operator

A

operator precedence

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

Three (3) types of operators

A
  1. Unary
  2. Binary
  3. Ternary
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

operator has a single operand

A

unary

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

operator has two (2) operands

A

binary

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

operator has three (3) operands

A

ternary

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

Operators are considered … if they are separated by a single operand

A

adjacent

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

When an expression has two (2) operators with the same precedence, the expression is evaluated according to its …

A

associativity

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

When there are two (2) adjacent operators with the same precedence, the left operator is evaluated first

A

left associativity

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

When there are two (2) adjacent operators with the same precedence, the right operator is evaluated first

A

right associativity

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

The precedence and associativity rules can be altered by placing … in expressions

A

parentheses

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

Variables in expressions are evaluated by fetching their values from memory

A

true

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

A … of a function occurs when the function changes either one of its parameters or a global variable

A

side effect

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

A … is declared outside the function but is accessible in the function

A

global variable

17
Q

A program has the property of … if any two (2) expressions in the program that have the same value can be substituted for one another anywhere in the program, without affecting the action of the program

A

referential transparency

18
Q

An operator can be used for more than one (1) purpose. This multiple use of an operator is called …

A

operator overloading