Deck 10: Control II - Procedures and Environments

ملء الشاشة (f)
exit full mode
سؤال
Pass by name is included in all Algol60 descendants.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
If a pointer is passed by value,the procedure cannot modify the contents of the pointer.
سؤال
Pass by value is the default mechanism in C++ and Pascal.
سؤال
A procedure is a mechanism for abstracting a group of actions or computations.
سؤال
In C and Java,parameters passed by value behave as local variables of the procedure.
سؤال
Pass by value-result is also known as copy-in,copy-out.
سؤال
In pass by name parameter passing,arguments are not evaluated until their actual use as parameters in the procedure.
سؤال
Pass by name can be described as an advanced inlining process for procedures.
سؤال
You call a procedure by stating its name,together with arguments to the call.
سؤال
Pass by value implies that changes cannot occur outside the procedure through the use of parameters.
سؤال
A procedure specification includes its name,the names and types of its formal parameters and its return type,if any.
سؤال
An activation record is a stored log recording each time a procedure or function is activated.
سؤال
When parameters are passed by value,the arguments are expressions that are evaluated at the time of the call,with the arguments' values becoming the values of the parameters during the execution of the procedure.
سؤال
Procedures were first introduced when memory was scarce,as a way of splitting a program into small,separately compiled pieces.
سؤال
When you define a procedure,the parameters you list in the interface are the formal parameters.
سؤال
Pass by reference is also known as copy-restore.
سؤال
A procedure declaration creates a constant procedure value and associates a symbolic name with that value.
سؤال
A call to a procedure transfers control to the beginning of the body of the called procedure.
سؤال
Another name for activation record is stack record.
سؤال
An activation of a block cannot communicate with the rest of the program.
سؤال
The group of actions in a procedure is called the ____ of the procedure.

A) parameters
B) arguments
C) activation record
D) body
سؤال
Variables declared in the calling method are said to be in the ____ environment.

A) calling
B) defining
C) static
D) stack
سؤال
A procedure with no nonlocal dependencies is considered to be in ____ form.

A) independent
B) closed
C) control
D) structured
سؤال
Reference counting is a lazy method of storage reclamation.
سؤال
A procedure communicates with the rest of the program through its parameters and through ____.

A) constants
B) functions
C) nonlocal references
D) overloaded variables
سؤال
The ____ environment houses global variables.

A) calling
B) dynamic
C) defining
D) universal
سؤال
____ are known as actual parameters.

A) Arguments
B) Global variables
C) Control statements
D) Normal parameters
سؤال
In Ada,parameters can be declared as in or out,but not both.
سؤال
A procedure is defined by providing a(n)____ and a body.

A) name
B) interface
C) activation record
D) error handler
سؤال
Recursion is allowed in Fortran77.
سؤال
A procedure communicates with its calling environment through ____.

A) parameters
B) local variables
C) constants
D) shared memory
سؤال
In strongly typed languages,procedure calls must be checked so that the arguments agree in type and number with the parameters of the procedure.
سؤال
A ____ is a mechanism in programming for abstracting a group of actions or computations.

A) statement
B) procedure
C) block
D) method
سؤال
If the parameter becomes an alias for the argument,the parameter is passed ____.

A) by reference
B) by address
C) by value
D) by type
سؤال
The ____ is the memory allocated for the local objects of a procedure block.

A) call record
B) activation record
C) activation heap
D) heap record
سؤال
Mark and sweep is a lazy method of storage reclamation.
سؤال
The ____ determines the allocation of memory.

A) stack
B) environment
C) memory manager
D) translator
سؤال
____ are used to revert control back to a method caller.

A) Return-statements
B) Revert-statements
C) Control-statements
D) Redirect-statements
سؤال
If a parameter behaves as a constant value during execution,the parameter is passed ___.

A) by address
B) by reference
C) by type
D) by value
سؤال
Pass ____ copies in the parameter value,and at the end of execution,copies out the final value of the parameter.

A) by value
B) by reference
C) by value-result
D) by address
سؤال
In a(n)____ environment,all memory allocation can be performed at load time,and the location of all variables are fixed for the duration of program execution.

A) dynamic
B) universal
C) global
D) fully static
سؤال
Historically,the interpretation of pass by name arguments as functions to be evaluated was expressed by referring to them as ____.

A) chunks
B) objects
C) thunks
D) expressions
سؤال
The process of joining a block of free memory with immediately adjacent blocks to form a larger contiguous block of free memory is called ____.

A) consolidation
B) defragmenting
C) reference counting
D) coalescing
سؤال
Reference counting is a form of ____.

A) tracking parameter use
B) reclamation of storage that is no longer referenced
C) allocating memory
D) accessing nonlocal variables
سؤال
In a(n)____ environment,activation records are not removed as long as there are references to any of its local objects.

A) closed
B) fully dynamic
C) type safe
D) fully static
سؤال
The access link provides access to ____.

A) local variables
B) nonlocal variables
C) parameters
D) imported variables
سؤال
The local variable ____ stores the distance from the environment pointer.

A) distance
B) locator
C) offset
D) pointer
سؤال
____ occurs when multiple access links must be followed to arrive at a nonlocal variable.

A) Access chaining
B) Lexical chaining
C) Environmental linking
D) Global linking
سؤال
The pointer to the previous activation record is the ____ link.

A) reverse
B) history
C) control
D) return
سؤال
The ____ maintains the location of the current activation record.

A) environment pointer
B) activation pointer
C) stack pointer
D) stack register
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 10: Control II - Procedures and Environments
1
Pass by name is included in all Algol60 descendants.
False
2
If a pointer is passed by value,the procedure cannot modify the contents of the pointer.
False
3
Pass by value is the default mechanism in C++ and Pascal.
True
4
A procedure is a mechanism for abstracting a group of actions or computations.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
5
In C and Java,parameters passed by value behave as local variables of the procedure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
6
Pass by value-result is also known as copy-in,copy-out.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
7
In pass by name parameter passing,arguments are not evaluated until their actual use as parameters in the procedure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
8
Pass by name can be described as an advanced inlining process for procedures.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
9
You call a procedure by stating its name,together with arguments to the call.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
10
Pass by value implies that changes cannot occur outside the procedure through the use of parameters.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
11
A procedure specification includes its name,the names and types of its formal parameters and its return type,if any.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
12
An activation record is a stored log recording each time a procedure or function is activated.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
13
When parameters are passed by value,the arguments are expressions that are evaluated at the time of the call,with the arguments' values becoming the values of the parameters during the execution of the procedure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
14
Procedures were first introduced when memory was scarce,as a way of splitting a program into small,separately compiled pieces.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
15
When you define a procedure,the parameters you list in the interface are the formal parameters.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
16
Pass by reference is also known as copy-restore.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
17
A procedure declaration creates a constant procedure value and associates a symbolic name with that value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
18
A call to a procedure transfers control to the beginning of the body of the called procedure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
19
Another name for activation record is stack record.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
20
An activation of a block cannot communicate with the rest of the program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
21
The group of actions in a procedure is called the ____ of the procedure.

A) parameters
B) arguments
C) activation record
D) body
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
22
Variables declared in the calling method are said to be in the ____ environment.

A) calling
B) defining
C) static
D) stack
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
23
A procedure with no nonlocal dependencies is considered to be in ____ form.

A) independent
B) closed
C) control
D) structured
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
24
Reference counting is a lazy method of storage reclamation.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
25
A procedure communicates with the rest of the program through its parameters and through ____.

A) constants
B) functions
C) nonlocal references
D) overloaded variables
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
26
The ____ environment houses global variables.

A) calling
B) dynamic
C) defining
D) universal
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
27
____ are known as actual parameters.

A) Arguments
B) Global variables
C) Control statements
D) Normal parameters
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
28
In Ada,parameters can be declared as in or out,but not both.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
29
A procedure is defined by providing a(n)____ and a body.

A) name
B) interface
C) activation record
D) error handler
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
30
Recursion is allowed in Fortran77.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
31
A procedure communicates with its calling environment through ____.

A) parameters
B) local variables
C) constants
D) shared memory
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
32
In strongly typed languages,procedure calls must be checked so that the arguments agree in type and number with the parameters of the procedure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
33
A ____ is a mechanism in programming for abstracting a group of actions or computations.

A) statement
B) procedure
C) block
D) method
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
34
If the parameter becomes an alias for the argument,the parameter is passed ____.

A) by reference
B) by address
C) by value
D) by type
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
35
The ____ is the memory allocated for the local objects of a procedure block.

A) call record
B) activation record
C) activation heap
D) heap record
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
36
Mark and sweep is a lazy method of storage reclamation.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
37
The ____ determines the allocation of memory.

A) stack
B) environment
C) memory manager
D) translator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
38
____ are used to revert control back to a method caller.

A) Return-statements
B) Revert-statements
C) Control-statements
D) Redirect-statements
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
39
If a parameter behaves as a constant value during execution,the parameter is passed ___.

A) by address
B) by reference
C) by type
D) by value
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
40
Pass ____ copies in the parameter value,and at the end of execution,copies out the final value of the parameter.

A) by value
B) by reference
C) by value-result
D) by address
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
41
In a(n)____ environment,all memory allocation can be performed at load time,and the location of all variables are fixed for the duration of program execution.

A) dynamic
B) universal
C) global
D) fully static
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
42
Historically,the interpretation of pass by name arguments as functions to be evaluated was expressed by referring to them as ____.

A) chunks
B) objects
C) thunks
D) expressions
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
43
The process of joining a block of free memory with immediately adjacent blocks to form a larger contiguous block of free memory is called ____.

A) consolidation
B) defragmenting
C) reference counting
D) coalescing
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
44
Reference counting is a form of ____.

A) tracking parameter use
B) reclamation of storage that is no longer referenced
C) allocating memory
D) accessing nonlocal variables
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
45
In a(n)____ environment,activation records are not removed as long as there are references to any of its local objects.

A) closed
B) fully dynamic
C) type safe
D) fully static
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
46
The access link provides access to ____.

A) local variables
B) nonlocal variables
C) parameters
D) imported variables
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
47
The local variable ____ stores the distance from the environment pointer.

A) distance
B) locator
C) offset
D) pointer
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
48
____ occurs when multiple access links must be followed to arrive at a nonlocal variable.

A) Access chaining
B) Lexical chaining
C) Environmental linking
D) Global linking
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
49
The pointer to the previous activation record is the ____ link.

A) reverse
B) history
C) control
D) return
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
50
The ____ maintains the location of the current activation record.

A) environment pointer
B) activation pointer
C) stack pointer
D) stack register
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.