[PL] PRELIM ANSWERS

5.0(1)
studied byStudied by 15 people
5.0(1)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/29

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

30 Terms

1
New cards

Some primitive data types are merely reflections of the _____.

hardware

2
New cards

Arrays are homogeneous aggregates of data elements identified by their position relative to the ______.

first element

3
New cards

*Associative arrays are unordered collections of data elements indexed by ______.

keys

4
New cards

A ______ defines a collection of data objects and a set of predefined operations on those objects.

data type

5
New cards

Java’s signed integer sizes include ______, short, int, long.

byte

6
New cards

_______ data types are essential for business applications like money handling.

decimal

7
New cards

______ data types are data types not defined in terms of other data types.

Primitive data types

8
New cards

Character types are often stored as ______.

numeric codings

9
New cards

An ______ is an ordinal type whose possible values are named constants.

enumeration

10
New cards

*Arrays allocated during run-time are located in either ______, ______, or ______.

heap, stack, global/static memory

11
New cards

A ______ is a multi-dimensional array in which all of the rows have the same number of elements and all columns have the same number of elements, while a ______ has rows with varying numbers of elements.

rectangular array, jagged array

12
New cards

A ______ is a possibly heterogeneous aggregate of data elements in which the individual elements are identified by names.

record

13
New cards

Extended BNF (EBNF) uses brackets [ ], parentheses ( ), and braces { } to represent ______, ______, and ______ respectively.

optional parts, alternative parts, repetitions

14
New cards

A grammar is ambiguous if and only if it generates a ______ that has two or more distinct ______.

sentential form, parse trees

15
New cards

A derivation is a repeated application of rules, starting with the ______ and ending with a sentence.

start symbol

16
New cards

In BNF, abstractions act like syntactic variables, also called ______.

nonterminal symbols/nonterminals

17
New cards

______ refers to the form or structure of the expressions, statements, and program units.

syntax

18
New cards

______ refers to the meaning of the expressions, statements, and program units.

semantics

19
New cards

Name two users of a language definition.

implementers, programmers

20
New cards

______ variables are a special category of nonlocal variables.

global

21
New cards

In dynamic scoping, the referencing environment includes local variables and all visible variables in ______ subprograms.

active

22
New cards

______ is an association between an entity and an attribute, such as between a variable and its type or value.

binding

23
New cards

The ______ of a variable is the time during which it is bound to a particular memory cell.

lifetime

24
New cards

List the six attributes that characterize a variable.

name, address, type, value, lifetime, scope

25
New cards

Enumerate five possible binding times in programming languages.

Language Design Time

Language Implementation Time

Compile Time

Load Time

Runtime

26
New cards

If two variable names can be used to access the same memory location, then those two variable names are called ______.

aliases

27
New cards

A binding is ______ if it first occurs before run time and remains unchanged throughout program execution.

static

28
New cards

What are the two fundamental pointer operations?

assignment & dereferencing

29
New cards

What is a dangling pointer?

A pointer points to a heap-dynamic variable that has been deallocated

30
New cards

A ______ is a type whose range of values consists of memory addresses and a special value, ______.

pointer type, null