Variables - Midterm Flashcards

1
Q

Static vs. Dynamic: in general

A

Static - attributes known before execution

Dynamic - attributes known / determined during execution

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

Implicit vs. Explicit:

var x;

A

explicit declaration, implicit binding

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

Implicit vs. Explicit:

x = []

A

Implicit declaration, explicit binding

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

Attribute vs. Keyword:

int x;

A

keyword is int, attribute is integer

name x is also an attribute

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

Static vs. Dynamic:

int n = 2;

A

Static attributes: integer, name (n)

Dynamic attributes: value (2)

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

Name binding should bind 3 things:

A

location
attributes
value

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

Symbol Table

A

names and attributes

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

Environment

A

names and locations

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

Memory

A

locations and values

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