Subroutines and Control Abstraction Flashcards

1
Q

What is a Control Abstraction?

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

What goes on behind the scenes when calling a subroutine?

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

What are the three main places when maintaining a stack?

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

Calling Sequence Info:

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

Function caller or callee tasks:

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

One thing that can be done with procedures is inline expansion. What is this?

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

What are some inline keywords in C and Ada?

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

Parameter Passing Info:

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

Parameter Passing by Value:

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

Parameter Passing by Reference:

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

Parameter Passing by Read Only:

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

Parameter Passing by Sharing:

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

Three modes in Ada for passing parameters:

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

References in C++:

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

Passing Parameters by Name:

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

Some languages support named parameters that can be given an any order:

A
17
Q

Some languages support a variabled number of parameters:

A
18
Q

Many languages restrict what can be returned from a function. What are some examples?

A
19
Q

Generic Subroutines and Modules

A
20
Q

Implicit Parametric Polymorphism

A
21
Q

Explicit Polymorphic Generics

A
22
Q

What kind of types can be passed as a generic parameter?

A
23
Q

Implementation Options for Generic Parameters:

A
24
Q

(T/F)

In some languages, all instances share the same code at runtime.

A

True

25
Q

Constraints on Generic Parameters:

A
26
Q

Generic Parameters Constraints in Ada:

A
27
Q

Generic Parameter Constraints in Java:

A
28
Q

C++ templates are very powerful. Elaborate:

A
29
Q

What is an exception?

A
30
Q

What are some solutions for exceptions?

A
31
Q

In ML, what could be a good way to recover from an exception?

A
32
Q

What are some exception handling mechanisms?

A
33
Q

What can an exception handler do?

A
34
Q

Exception in Java:

A
35
Q

Exception Handling Techniques:

A
36
Q

Exception Handling Using a Table:

A
37
Q

What is the philosophy of exceptions?

A
38
Q

Explain Coroutines:

A