• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/60

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

60 Cards in this Set

  • Front
  • Back

In programming languages, the use of keywords is more restrictive than reserved words.

FALSE

Like the if/else statement in Java and C++, the Racket else statement is optional.

FALSE

Variables can be characterized as a sextuple (6-tuple) of which six attributes?

name, address, value, type, lifetime, scope

At which possible binding time is a C or C++ static variable bound to a memory location?

load time

At which possible binding time is the Java + operator symbol bound to a memory location?

language design time

Perl: $x = 4;


Python: x = int(4.0)

dynamic type binding

The process of taking a memory cell from a pool of available memory and binding it to a viariable.

Allocation

The process of placing a memory cell that has been unbound from a variable back into the pool of available memory.

Deallocation

The time during which the variable is bound to a specific memory location.

lifetime

The binding of more than one variable to the same memory cell.

aliasing

Variables that are bound to memory cells before program execution begins and remain bound to those same memory cells until program execution terminates.

static variables

Variables whose storage bindings are created when their declaration statements are elaborated, but whose types are statically bound.

stack-dynamic variables

Variables that are nameless (abstract) memory cells allocated and deallocated by explicit run-time instructions written by the programmer.

explicit heap-dynamic variables

Variables bound to heap storage only when they are assigned values.

implicit heap-dynamic variables

Python data types are declared explicitly.

FALSE

A word of a programming language that is special only in certain contexts.

keyword

A special word of a programming language that can- not be used as a name.

reserved word

A string of characters used to identify some entity in a program.

name

An abstraction of a computer memory cell or collection of cells.

variable

What are the design issues for names?

case-sensitive, reserved/keywords, length

What is the potential danger of ­case-​­sensitive names?

readability

_____ are when more than one variable name can be used to access the same memory location.

alias

A binding that first occurs before run time begins and remains unchanged throughout program execution

static binding

A binding that first occurs during run time or can change in the course of program execution

dynamic binding

The time during which the variable is bound to a specific memory location

lifetime

The range of statements in which the variable is visible

scope

scope that looks for the increasingly larger enclosing programs until a delcaration of the non-local variable is found.

static scoping

scope that determines the scope by the sequence of sub-program calls.

dynamic scoping

A section of code to have its own local variables whose scope is minimized.

block



What is the purpose of the let constructs in functional languages?

we need that construct to achieve block like scoping of imperative languages

What are the advantages of named constants?

ability to read and modify

What are the advantages and disadvantages of dynamic scoping?

Advantages: More flexible than static scoping and convenient.


Disadvantages: Makes it difficult to read. Also, reliability and efficiency are affected.

An array in which the subscript ranges are statically bound, but the allocation is done at declaration elaboration time during execution.

Fixed stack-dynamic array

An array in which both the subscript ranges and the storage allocation are dynamically bound at elaboration time.

Stack-dynamic array

An array in which the subscript ranges and the storage binding are both fixed after storage is allocated. Additionally, both the subscript ranges and storage bindings are done when the user program requests them during execution, and the storage is allocated from the heap.

Fixed heap-dynamic array

An array in which the subscript ranges are statically bound and storage allocation is static (done before run time).

Static array

An array in which the binding of subscript ranges and storage allocation is dynamic and can change any number of times during the array’s lifetime.

Heap-dynamic array

Are tuples in Python mutable?

NO

In Perl, and associative array is called a

HASH

A programming language is strongly typed if

type errors are always detected

____ is a data type whose variables may store different type values at different times during program execution.

union

A tuple is a data type that is similar to a record, except that the elements are not named.

TRUE

An associative array is an unordered collection of data elements that are indexed by

an equal number of values called keys, which may be strings or numerics.

The values of enumeration constants

can be explicitly assigned any integer literal in the type’s definition.

Which of the following are signed integers in Java?

short, int, byte, long

In Java, String objects are mutable.

FALSE

Which languages do not support coercion in expressions?
F#, ML, JAVA, Perl

F#, ML

An explicit type conversion is called

casting

According to your textbook, what are the two distinct kinds of uses for pointers?

Pointers provide some of the power of indirect addressing.


Pointers provide a way to manage dynamic storage.

Which language below allows arrays to have negative integer indices?


Java, C++, Python, Perl

Python, Perl

Are the unions of F# discriminated?

YES

Are the unions of Ada always type checked?

No

Variables that are defined inside subprograms are called "______ variables".

local

The repeated execution of a statement or compound statement is accomplished by either


iteration or recursion

Iterative statements



a control statement (gatekeeper) and the statements whose execution it controls

control structure

_____ provides the means of choosing between two or more paths of execution

selection statement

________ transfers execution control to a specified place in the program

unconditional branch statement

Each line in the selection statement, consisting of a Boolean expression (a guard) and a statement or statement sequence

guarded command

describes the interface to and the actions of the subprogram abstraction

subprogram definition

Design issues for subprograms

variables static/dynamic?


parameter passing methods?


subprograms be overloaded?