Shared Flashcard Set

Details

CS424 Chapter 5
Chapter 5: Concepts of Programming Languages by Sebesta
24
Computer Science
Undergraduate 4
06/23/2024

Additional Computer Science Flashcards

 


 

Cards

Term
What is a name?
Definition
A name is a string of characters used to identify some entity in a program
Term
What is a reserved word?
Definition
It is a special word of a programming language that cannot be used as a name
Term
What is an address?
Definition
An address of a variable is a machine memory address with which it is associated
Term
What is an alias?
Definition
It's when more than one variable name accesses the same memory location
Term
What is a type?
Definition
A type is the range of values a variable can store and the acceptable operations that are defined for variables of that type
Term
What is a value?
Definition
The value is the contents of the memory cell or cells associated with a variable. Sometimes called r-value
Term
What is binding?
Definition
Binding is an association between an attribute and an entity
Term
What is binding time?
Definition
Binding time is the time at which binding takes place.
Term
What is static binding?
Definition
It is binding that takes please before run time
Term
What is dynamic binding?
Definition
It is binding that takes place during run time
Term
What is an explicit type declaration?
Definition
An explicit type declaration is a statement in a program that lists variable names and specifies their type
Term
What is implicit type declaration?
Definition
It is when the a variable and its type are associated through default conventions rather than declarative statements
Term
What is allocation?
Definition
It is when memory is taken from a pool of available memory and bound to a variable
Term
What is deallocation?
Definition
It is when memory that was bound to a variable is taken back to the pool of available memory
Term
What is the lifetime of a variable?
Definition
The lifetime of a variable is the time during which is is bound to a memory location
Term
What is a static variable?
Definition
It's a variable that has been bound to a memory location before execution and remains bound until the program terminates. Use the word static
Term
What are stack-dynamic variables?
Definition
They are variables whose storage bindings are created when their declaration statement are elaborated, but whose types are statically bound.
Term
What are explicit heap-dynamic variables?
Definition
Explicit heap-dynamic variables are nameless (abstract) memory cells that are allocated and deallocated by explicit run-time instructions written by the programmer (new/delete, malloc/dealloc)
Term
What are implicit heap-dynamic variables?
Definition
They are variable that are bound to heap storage only when they are assigned values.
Term
What is the scope of a variable?
Definition
It is the range of statements in which a variable is visible
Term
What does it mean for a variable to be visible?
Definition
A variable is visible in a statement if it can be referenced or assigned in that statement
Term
A variable is _____ in a program unit or block if it is declared there.
Definition
local
Term
What is static scoping?
Definition
It is when the scope of a variable can be seen prior to execution. 2 types of static scoping 1. Those that can have nested subprograms, and 2. those that cannot. Static scoping is based on its static parent up to its static ancestor
Term
What is dynamic scoping?
Definition
Dynamic scoping is based on the calling sequence of subprograms, not on their spatial relation to each other
Supporting users have an ad free experience!