Deck 7: Basic Semantics

ملء الشاشة (f)
exit full mode
سؤال
Locations are places where values can be stored.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
A translator's symbol table stores the mappings between names and attributes.
سؤال
The declaration before use scoping rule in C allows any declaration to be used as long as it is declared within the current block.
سؤال
Names can be bound to attributes prior to translation time,as in the case of predefined identifiers.
سؤال
Each function call generates a region of allocated memory associated with the function; this is called an activation record.
سؤال
If an operator can be used to perform more than one operation,it is said to be shadowed.
سؤال
In C,blocks are called compound statements.
سؤال
Any scoping structure that can be referenced directly in a language must have its own symbol table.
سؤال
Declaration visibility includes only those regions of a program where the bindings of the declaration apply.
سؤال
When a nonlocal name is used in an expression,the declaration that applies to that name cannot be determined until execution time under dynamic scoping.
سؤال
A block consists of a sequence of declarations followed by a sequence of statements.
سؤال
In C++,declarations that bind all potential attributes are called prototypes.
سؤال
The lifetime of an object is the duration of its allocation in the environment.
سؤال
Declarations in surrounding blocks are called nonlocal declarations.
سؤال
A fundamental abstraction mechanism in any programming language is the use of names,or identifiers to denote language entities or constructs.
سؤال
The meaning of a name cannot be determined by the attributes associated with it.
سؤال
Binding time refers to when an attribute is computed and bound to a name.
سؤال
Static binding occurs during execution.
سؤال
Names can be reused within nested blocks by associating each declaration with a level number and an offset.
سؤال
Lexical scoping rules are sometimes called dynamic scoping.
سؤال
____ are generally bound at load time.

A) Global variables
B) Predefined identifiers
C) All variables
D) All attributes
سؤال
The bindings of ____ to storage locations is called the memory.

A) names
B) values
C) attributes
D) identifiers
سؤال
____ are any storable quantities,such as integers.

A) Data
B) Values
C) Locations
D) Identifiers
سؤال
The bindings of names to storage locations is called the ____.

A) translator
B) compiler
C) environment
D) symbol table
سؤال
In a block-structured language with heap allocation,there are three kinds of allocation: static (for global variables),automatic (for local variables),and dynamic (for heap allocation).
سؤال
The ____ is the level number and offset of a declared name.

A) lexical address
B) block address
C) compound address
D) explicit address
سؤال
____ binding occurs during execution.

A) Static
B) Rapid
C) Value
D) Dynamic
سؤال
The body of an externally defined function will not be bound until ____.

A) execution time
B) link time
C) translation time
D) load time
سؤال
If an operator performs more than one function it is said to be ____.

A) overloaded
B) shadowed
C) implicit
D) variable
سؤال
The scope of a binding is ____.

A) the region over which the binding is maintained
B) the precision of the binding
C) the time when the binding takes place
D) the magnitude of the binding
سؤال
Static constants are always computed at load time.
سؤال
In C++,declarations that bind all potential attributes are called ____.

A) prototypes
B) definitions
C) symbols
D) explicits
سؤال
Each call to a method is referred to as a(n)____.

A) invocation
B) execution
C) activation
D) branching
سؤال
In object-oriented languages such as Java and Smalltalk,the ____ is the only declaration that does not itself need to be inside another class declaration.

A) class
B) module
C) file
D) package
سؤال
____ declarations are associated with a specific block.

A) Global
B) Specific
C) Local
D) General
سؤال
Dangling references are locations that have been deallocated from the environment but can still be accessed by a program.
سؤال
Java requires manual deallocation of objects.
سؤال
Java uses assignment by cloning for all object variables.
سؤال
In C,the scope of a binding is limited to the block in which its associated declaration appears.This scoping rule is called ____ scope.

A) block
B) lexical
C) package
D) namespace
سؤال
A variable declared locally within a block is said to ____ a global variable of the same name.

A) occlude
B) override
C) mirror
D) shadow
سؤال
When a change in the value of a variable persists beyond the execution of a statement,a(n)____ has occurred.

A) side effect
B) persistent effect
C) error
D) compound change
سؤال
A ____ is an object whose stored value can change during execution.

A) variable
B) class
C) pointer
D) method
سؤال
Language systems that automatically reclaim garbage are said to perform ____.

A) memory reallocation
B) memory reclamation
C) recycling
D) garbage collection
سؤال
Dynamic allocation places variables ____.

A) on the stack
B) in the symbol table
C) in the pointer list
D) on the heap
سؤال
A pointer is an object whose stored value is a(n)____.

A) compound value
B) activation record
C) reference to another object
D) direction
سؤال
A(n)____ occurs when the same object is bound to two different names at the same time.

A) conflict
B) alias
C) multi-reference
D) duplicate
سؤال
Garbage is defined as ____.

A) a collection of unused constants
B) a collection of unused variables
C) variables with duplicate values
D) memory that has been allocated in the environment but that has become inaccessible to the program
سؤال
In C,the ____ operator retrieves the address of a variable as a pointer.

A) dereference
B) reference
C) address of
D) allocation
سؤال
A ____ constant is a name for a literal.

A) compile-time
B) static
C) manifest
D) symbolic
سؤال
Assignment by sharing works by ____.

A) copying the value to a new location
B) duplicating memory addresses
C) copying the location of the first variable to the second
D) accessing shared memory
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 7: Basic Semantics
1
Locations are places where values can be stored.
True
2
A translator's symbol table stores the mappings between names and attributes.
True
3
The declaration before use scoping rule in C allows any declaration to be used as long as it is declared within the current block.
False
4
Names can be bound to attributes prior to translation time,as in the case of predefined identifiers.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
5
Each function call generates a region of allocated memory associated with the function; this is called an activation record.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
6
If an operator can be used to perform more than one operation,it is said to be shadowed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
7
In C,blocks are called compound statements.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
8
Any scoping structure that can be referenced directly in a language must have its own symbol table.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
9
Declaration visibility includes only those regions of a program where the bindings of the declaration apply.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
10
When a nonlocal name is used in an expression,the declaration that applies to that name cannot be determined until execution time under dynamic scoping.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
11
A block consists of a sequence of declarations followed by a sequence of statements.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
12
In C++,declarations that bind all potential attributes are called prototypes.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
13
The lifetime of an object is the duration of its allocation in the environment.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
14
Declarations in surrounding blocks are called nonlocal declarations.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
15
A fundamental abstraction mechanism in any programming language is the use of names,or identifiers to denote language entities or constructs.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
16
The meaning of a name cannot be determined by the attributes associated with it.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
17
Binding time refers to when an attribute is computed and bound to a name.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
18
Static binding occurs during execution.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
19
Names can be reused within nested blocks by associating each declaration with a level number and an offset.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
20
Lexical scoping rules are sometimes called dynamic scoping.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
21
____ are generally bound at load time.

A) Global variables
B) Predefined identifiers
C) All variables
D) All attributes
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
22
The bindings of ____ to storage locations is called the memory.

A) names
B) values
C) attributes
D) identifiers
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
23
____ are any storable quantities,such as integers.

A) Data
B) Values
C) Locations
D) Identifiers
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
24
The bindings of names to storage locations is called the ____.

A) translator
B) compiler
C) environment
D) symbol table
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
25
In a block-structured language with heap allocation,there are three kinds of allocation: static (for global variables),automatic (for local variables),and dynamic (for heap allocation).
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
26
The ____ is the level number and offset of a declared name.

A) lexical address
B) block address
C) compound address
D) explicit address
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
27
____ binding occurs during execution.

A) Static
B) Rapid
C) Value
D) Dynamic
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
28
The body of an externally defined function will not be bound until ____.

A) execution time
B) link time
C) translation time
D) load time
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
29
If an operator performs more than one function it is said to be ____.

A) overloaded
B) shadowed
C) implicit
D) variable
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
30
The scope of a binding is ____.

A) the region over which the binding is maintained
B) the precision of the binding
C) the time when the binding takes place
D) the magnitude of the binding
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
31
Static constants are always computed at load time.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
32
In C++,declarations that bind all potential attributes are called ____.

A) prototypes
B) definitions
C) symbols
D) explicits
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
33
Each call to a method is referred to as a(n)____.

A) invocation
B) execution
C) activation
D) branching
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
34
In object-oriented languages such as Java and Smalltalk,the ____ is the only declaration that does not itself need to be inside another class declaration.

A) class
B) module
C) file
D) package
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
35
____ declarations are associated with a specific block.

A) Global
B) Specific
C) Local
D) General
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
36
Dangling references are locations that have been deallocated from the environment but can still be accessed by a program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
37
Java requires manual deallocation of objects.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
38
Java uses assignment by cloning for all object variables.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
39
In C,the scope of a binding is limited to the block in which its associated declaration appears.This scoping rule is called ____ scope.

A) block
B) lexical
C) package
D) namespace
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
40
A variable declared locally within a block is said to ____ a global variable of the same name.

A) occlude
B) override
C) mirror
D) shadow
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
41
When a change in the value of a variable persists beyond the execution of a statement,a(n)____ has occurred.

A) side effect
B) persistent effect
C) error
D) compound change
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
42
A ____ is an object whose stored value can change during execution.

A) variable
B) class
C) pointer
D) method
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
43
Language systems that automatically reclaim garbage are said to perform ____.

A) memory reallocation
B) memory reclamation
C) recycling
D) garbage collection
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
44
Dynamic allocation places variables ____.

A) on the stack
B) in the symbol table
C) in the pointer list
D) on the heap
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
45
A pointer is an object whose stored value is a(n)____.

A) compound value
B) activation record
C) reference to another object
D) direction
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
46
A(n)____ occurs when the same object is bound to two different names at the same time.

A) conflict
B) alias
C) multi-reference
D) duplicate
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
47
Garbage is defined as ____.

A) a collection of unused constants
B) a collection of unused variables
C) variables with duplicate values
D) memory that has been allocated in the environment but that has become inaccessible to the program
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
48
In C,the ____ operator retrieves the address of a variable as a pointer.

A) dereference
B) reference
C) address of
D) allocation
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
49
A ____ constant is a name for a literal.

A) compile-time
B) static
C) manifest
D) symbolic
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
50
Assignment by sharing works by ____.

A) copying the value to a new location
B) duplicating memory addresses
C) copying the location of the first variable to the second
D) accessing shared memory
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.