Programming Language Concepts Final Exam
Terms in this set (98)
An ____ _____ is an unordered collection of data elements that are indexed by keys.
An Associative Array is an unordered collection of data elements that are indexed by _____.
In Perl, associative arrays are called _____ because their elements are stored and retrieved with hash functions.
Python's associative arrays (_____) are similar to Perl's hashes, except that the values are references to objects.
Lua's associative arrays (_____) are the only data structure in the language.
A _____ is a data structure in which individual elements are identified by names.
The fundamental difference between a record and an array is that record elements (_____) are not referenced by indices.
The _____ _____ 01, 02, and 05 indicate levels of nesting
With ______ _____ the name of the largest enclosing record comes first;
Fully Qualified Reference
A _____ _____ _____ to a record field is one in which all intermediate record names, from the larges enclosing record to the specific field, are named.
COBOL also allows _____ _____ to record fields. In an elliptical reference, the field is named, but any or all of the enclosing record names can be omitted, as long as the resulting reference is unambiguous.
A _____ is a data type that is similar to a record, except that the elements are not named.
_____ have always been part of functional languages, but in recent years they have found their way into some imperative languages.
_____ _____ are powerful mechanism for creating lists. They are derived from set notation. They first appeared in Haskell.
A _____ is a type whose variables may store values of different types at different times during program execution.
Unions in C++ and C are called _____ _____ because of the freedom allowed in their use.
Tag or Discriminant
Each union includes a type indicator known as a _____
A union with a discriminant is called a _____ _____
The values of a _____ type consist of memory addresses and a special value.
_____ is not a valid address; it indicates that a pointer cannot currently be used to reference any memory cell
A _____ _____ is a pointer that contains the address of a heap-dynamic variable that has been deallocated.
Lost Heap-Dynamic Variable
_____ _____ ____ is a heap-dynamic variable that is no longer accessible to a program.
The problem of lost-heap dynamic variables is sometimes called _____ _____
A variable that is no longer accessible to a program is sometimes called _____ because they are no longer useful, yet the space the occupy cannot be reallocated.
A value of a _____ _____ is similar to a pointer, except that it must refer to an object or other value in memory.
Reference Counters (eager approach)
Reclamation is incremental and is done when inaccessible cells are created.
Mark-Sweep (lazy approach)
Reclamation occurs only when the list of available space becomes empty.
deferred reference counting
The time required to maintain reference counters can hurt the performance of a program. Performance can be improved by _____ _____ _____, which avoids reference counters for some pointers.
Incremental mark sweep
_____ _____ _____ garbage collection occurs more frequently, long before memory is exhausted. This strategy is more effective at reclaiming storage and reduces the delay in application execution.
_____ _____ is the activity of ensuring that the operands of an operator are of compatible types
A _____ type is one that is either legal for the operator or is allowed under language rules to implicitly converted to a legal type
Conversion of an compatible type is called _____
A _____ _____ is the application of an operator to an operand of an inappropriate type
Dynamic Type Checking
Dynamic type binding requires type checking are run time, which is called _____ _____ ____
One of the ideas in language design that became prominent in the 1970s was _____ _____
A programming language is _____ _____ if type errors are always detected, either at compile time or at run time.
Structure type equivalence
Variables have ______ ______ _____ if their types have identical structures.
Name type equivalence
Variables have equivalent types if they are defined either in the same declaration or in declarations that use the same type name.
Two types are _____ if an operand of one type can be substituted for one of the other type without coercion
A _____ _____ is derived from an existing type
An ADA _____ is possible range-constrained version of an existing type
Binary operators appearing between their operands
Binary operators appearing before their operands
Binary operators appearing after their operands
Unary plus is called the _____ _____ because it usually has no effect.
When an expression contains adjacent occurences of operators with the same precedence, _____ rules determine which operator is evaluated first.
A _____ _____ occurs when an operator or function call performs some other action in addition to returning a value
A program has the property of _____ _____ if any two expressions with the same value can be substituted for each other without affecting the programs behavior.
_____ _____ is usually considered acceptable as long as neither readability nor reliability suffers.
A _____ _____ converts a value to a type that cannot store even approximations of all the values of the original type.
Ex. Converting a double to a float
A _____ converts a value to a type that can include at least approximations of all the values of the original type.
Exp Converting int to a float
Languages that allow ____ _____ must define rules for coercions, because computers do not have binary operations that take operands of different types
The result of an operation is too large to store in the designated amount of memory
The result of an operation is too small to represent. Division by zero.
Division by zero generates a run-time error or _____ in most languages, but under and overflow may go undetected
____ _____ compares the values of its two operands
With ______ _____ the value of an expression is determined without evaluating all of its subexpressions
Compound Assignment Operator
A _____ _____ _____ combines assignment with some other operation
Ex. sum += value
Statements that give programs the capability to select from among alternative control flow paths and repeatedly execute sequences of statements are called ____ _____
A _____ _____ is a control statement and the collection of statements whose execution it controls
A _____ _____ provides a way of choosing between two or more execution paths in a program
A _____ _____ statement allows the selection of one of any number of statements or statement groups
Branch Table (Jump Table)
The indices of the table are the case values.
The elements of the table are the segment labels.
Elements whose indices are not case values contain the default label.
Finding the matching case is done by array subscripting.
Iterative Statement (Loop)
A _____ _____ causes a statement or collection of statements to be executed zero, one or more times
The _____ of a loop is the collection of statements whose execution is controlled by an iterative statement
A _____ loop tests the condition for loop completion before the loop body is executed
A ____ loop tests the condition for loop completion after the loop body is executed
A counter-controlled loop have a _____ _____ in which the count is stored
A counter controlled loop has _____ _____
_____ is a value of the loop variable
_____ is the vale of the loop variable
_____ is the difference between sequential values of the loop variable
Another kind of iterative statement uses an _____ to traverse the elements of a data structure
In Ruby, a _____ is a sequence of code delimted by either braces or the do and end reserved words
Unconditional Branch Statement
An _____ _____ _____ or goto transfers control to a specified location in a program
A _____ _____ describes the interface to a subprogram as well as the actions of the subprogram
A _____ _____ is an explicit request that a specific subprogram be executed
A subprogram is _____ if it has been called but has not yet returned
A _____ _____ the first line of a definition, serves serves several purposes
The _____ _____ of a subprogram specifies the number, order, and types of its formal parameters
The _____ of a subprogram is its parameter profile plus, if it is a function, its return type
Function declarations are called _____ in C and C++. Such declarations are often places in header files
The parameters in a subprogram header are called _____ _____
A subprogram call specifies the name of the subprogram and a list of _____ _____ to be bound to the subprograms formal parameters
The correspondence between actual and formal parameters is done by position: The first actual parameter is bound to the first formal parameter and so forth.
_____ _____ are names of formal parameters that are explicitly connected with actual paramters
Subprograms can be define their own variables called _____ _____
Data is received from the corresponding actual parameter
Data is sent to the actual parameter
Data is both send and received
The value of the actual parameter is used to initialize the corresponding formal parameter. Is normally implemented by copy.
A _____ formal parameter behaves like a local variable. Just before control returns to the caller, the parameter's value is copied to the caller's actual parameter.
_____ is a combination of pass-by-value and pass-by result. It is an implementation model for inout-mode parameters in which actual values are moved.
_____ transmits an access path, usually just an address, to the called subprogram.
With _____, the actual parameter is, in effect, textually substituted for each occurrence of the corresponding formal parameter.
YOU MIGHT ALSO LIKE...
Academic Word Lists - AWL Sublists
CS 424 Exam 2
CS 1301 Exam 3 Vocabulary
CS 2316 Exam 1
OTHER SETS BY THIS CREATOR
Programming Language Concepts - Test 2
Parallel and Distributed Computing Midterm
THIS SET IS OFTEN IN FOLDERS WITH...
Programming Language Concepts - Chapter 7 (languages)
Programming Language Concepts Chapter 1
PLC Chapter 3