Test 2 Flashcards

1
Q

is a word that is special only in certain contexts

A

keyword

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

is a special word that cannot be used as a user-defined name

A

reserved word

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

If two variable names can be used to access the same memory location , they are called

A

aliases

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

is a program statement used for declaring the types of variables.

A

explicit declaration

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

is a default mechanism for specifying types of variables through default conventions, rather than declaration statements.

A

implicit declaration

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

is an association between an entity and an attribute , such as between a variable and its type or value, or between an operation and a symbol

A

binding

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

is the time at which a binding takes place.

A

Binding time

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

The ________ of a variable is the time during which it is bound to a particular memory cell.

A

lifetime

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

A binding is _______ if it first occurs before run time and remains unchanged throughout program execution.

A

static

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

A binding is _________ if it first occurs during execution or can change during execution of the program .

A

dynamic

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

of a variable is the range of statements over which it is visible.

A

scope

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

of a program unit are those that are declared in that unit.

A

local variables

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

of a program unit are those that are visible in the unit but not declared there.

A

nonlocal variables

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

are a special category of nonlocal variables.

A

Global variables

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

of a statement is the collection of all names that are visible in the statement.

A

referencing environment

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

is a variable that is bound to a value only when it is bound to storage.

A

named constant

17
Q

What are some design issues for names:

A

Are names case sensitive ?

Are special words reserved words or keywords?

18
Q

Variable attributes consist of:

A

Type- determines the range of values of variables and the set of operations that are defined for values of that type; in the case of floating point, type also determines the precision

Value- the contents of the location with which the variable is associated

19
Q

is a section of software code or an algorithm in software programming. Can consist of one or more statements or declarations. It is possible for it to contain one more blocks nested within it

A

block

20
Q

means checking that each operation should receive proper number of arguments and of proper data type.

A

Type checking

21
Q

What are some design issues for subprograms

A

Are local variables static or dynamic? Can subprogram definitions appear in other subprogram definitions ?
What parameter passing methods are provided?
Are parameter types checked?
If subprograms can be passed as parameters and subprograms can be nested, what is the referencing environment of a passed subprogram ? Are functional side effects allowed ? What types of values can be returned from functions ?
How many values can be returned from functions ?
Can subprograms be overloaded ?

22
Q

What are some design issues ate specific to functions?

A

Are side effects allowed ?

What types of values can be returned? How many values can be returned?

23
Q

Keyword versus positional parameters

A

Positional arguments are arguments that can be called by their position in the function call. Keyword arguments are arguments that can be called by their name.

24
Q

is one that has the same name as another subprogram in the same referencing environment

A

overloaded subprogram

25
Q

takes parameters of different types on different activations

A

generic subprogram

26
Q

is a subprogram that has multiple entries and controls them itself

A

Co-routines

27
Q

A coroutine call is named a

A

Resume

28
Q

How do you implement simple subprograms ?

A
  1. Save the execution status of the caller. 2. Carry out the parameter-passing process.
  2. Pass the return address to the callee 4. Transfer control to the callee
29
Q

Chain offset vs nesting depth

A

the difference between the static depth of the subprogram containing the reference to X and the static depth of the subprogram contining the declaration for

30
Q

What type of abstraction is a subprogram?

A

Process abstraction.

31
Q

What are the three general characteristics of subprograms?

A

Has a single entry point, calling suspends, call goes back after.

32
Q

What is a subprogram call?

A

call to the subprogram to execute.

33
Q

What are formal parameters ? What are actual parameters?

A

formal are in header.

Actual are in the call.

34
Q

means that subprograms which cannot be nested subprograms and all local variables are static

A

Simple subprogram

35
Q

What must be stored for the linkage to a subprogram?

A

Execution status information be stored for the linkage to a subprogram.

36
Q

What is an EP and what is the purpose?

A

EP is required to control the execution of a subprogram. Controls execution by pointing the the top of the execution stack