Variables - Midterm Flashcards
1
Q
Static vs. Dynamic: in general
A
Static - attributes known before execution
Dynamic - attributes known / determined during execution
2
Q
Implicit vs. Explicit:
var x;
A
explicit declaration, implicit binding
3
Q
Implicit vs. Explicit:
x = []
A
Implicit declaration, explicit binding
4
Q
Attribute vs. Keyword:
int x;
A
keyword is int, attribute is integer
name x is also an attribute
5
Q
Static vs. Dynamic:
int n = 2;
A
Static attributes: integer, name (n)
Dynamic attributes: value (2)
6
Q
Name binding should bind 3 things:
A
location
attributes
value
7
Q
Symbol Table
A
names and attributes
8
Q
Environment
A
names and locations
9
Q
Memory
A
locations and values