recursion Flashcards

1
Q

recursion

A

any function that calls itself

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

Activation record are:

A

stores local variables and parameters for a function.

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

What are the 2 components of Activation records?

A
  1. return value - actual return value

2. return address - address in memory of then ext instruction to execute after the function returns.

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

the return value

A

stored in the activation record; RETURN stores the value in the activation record where it can be read by the calling function

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

the return address

A

memory address of the next instruction to execute when the function returns

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

can u change a return address?

A

no

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

System stack

A

activation records are stored on a stack within the operating system.

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