stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Concepts of Programming Languages-Ch9 & 10 Flashcards | StudBud
Explore
/
Concepts of Programming Languages-Ch9 & 10
9: Actual parameters
9: Process abstractions
Concepts of Programming Languages-Ch9 & 10
20 terms
·
StudBud Administration
·
130 plays
Ch 9: Subprograms Ch 10: Implementing Subprograms
Flashcards
20 cards
F
Practice quiz
P
Host live
L
Questions
20
Answers
1
9: Process abstractions
don't exist, only abstract data types
are also known as methods in OO languages
make code reuse possible
Are implemented as subprograms
2
9: Actual parameters
are the same as action parameters
are the same as acting parameters
are limited to no more than 10
are the parameters used in a call
3
9: Procedures
must be consistent with policy
were first used in the 1800s by Charles Babbage
are an example of a process abstraction
are limited to 100 lines of code
4
10: A static link or static scope pointer
points to the activation record instance of a static parent
is part of a static chain connecting activation records
is used for access to nonlocal variables
makes subprogram nesting possible
5
10: Dynamic scoping
Makes programs very complex
Is not allowed in functional languages
All of the above
Is not used in most modern programming languages
6
9: Subprogram calls
are invocations of subprograms
do not always add to the call stack
may or may not include parameter passing
transfer control to another part of the program
7
9: Formal parameters
are defined in subprogram headers
are not bound until the subprogram is called
are the opposite of informal parameters
can be values or references to values
8
10: Parameters can be passed
to functions or procedures
in registers instead of in the run-time stack
by value or by reference
as long as a function is not recursive
9
10: The stack is also known as the run-time stack
True
False
10
9: The three semantic models of parameter passing are in mode, out mode, and inout mode
True
False
11
9: Functions
usually return a value
and procedures are really the same thing
may or may not return a value
are only for math computations
12
9: Local variables
are accessible to all parts of a program
are not as useful as global variables
are part of the call stack
should not exceed 10 in number
13
10: The return address in an activation record is
is the address of the first statement in the program
is the last address of the subprogram
is the address of the prior activation record
The address of the statement following the subprogram call
14
9: Variable numbers of parameters are allowed in some languages
False
True
15
10: the subprogram linkage is the subprogram call and return operations
False
True
16
10: The number of recursive calls
depends on a loop counter variable
cannot exceed 128 in any program
is limited by the base case
is limited by the memory of the computer
17
10: Static chaining is the most common way to implement static scoping in programming languages
False
True
18
9: Pass by value, and pass by reference
use the same amount of memory in the call stack
are methods for passing parameters to and from subprograms
are ways to read files from disk
use the same syntax
19
10: activation records contain local variables, parameters, and return addresses, nothing more
False
True
20
10: Stack-dynamic local variables make recursion possible
False
True