Data Types Flashcards

1
Q

defines a collection of data values and a set of predefined operations on those values

A

data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Data types that are not defined in terms of other types are called

A

primitive data types

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The primitive data types of most imperative languages include …

A

numeric, Boolean, and character types

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

has range of values that has only two (2) elements, one for true and one for false

A

Boolean data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

is used to store only a single character. Examples of characters include letters, numerical digits, common punctuation marks, and whitespace

A

character data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Numeric type includes

A

Integer, floating-point data types, decimal data types

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

is the most common primitive numeric data type

A

integer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

model real numbers, but the representations are only approximations of many real numbers.

A

floating-point data types

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

store a fixed number of decimal digits, with the decimal point at a fixed position in value

A

decimal data types

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

has values that consist of sequences of characters

A

character string (or string) type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

The most common string operations are? (5)

A

assignment, concatenation, substring reference, comparison, and pattern matching

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the three string length options? (3)

A

Static length string, Limited dynamic length string, Dynamic length string

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The length of string values can be fixed and set when the string is created

A

Static length string

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

The length of string values can have varying length up to a declared and fixed maximum set by the variable’s definition.

A

Limited dynamic length string

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

The length of string values can have varying length with no maximum

A

Dynamic length string

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

consist of range of possible values that can be easily associated with the set of positive integers

A

ordinal type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Two (2) user-defined ordinal types

A
  1. Enumeration type
  2. Subrange type
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

is one in which all of the possible values, which are name constants, are provided, or enumerated, in the definition.

A

enumeration type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

represents a subset of the values in another ordinal type

A

subrange type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

is a container object that stores a fixed number of values of a single type

A

array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

The individual elements of an array are reference using a … or …

A

subscript or index

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Five (5) categories of arrays based on the binding to subscript ranges, the binding to storage, and from where the storage is allocated

A
  1. Static array
  2. Fixed stack-dynamic array
  3. Stack-dynamic array
  4. Fixed-heap dynamic array
  5. Heap-dynamic array
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

has subscript ranges that are statically bound and its storage allocation is static

A

static array

24
Q

has subscript ranges that are statically bound, but its allocation is done at declaration elaboration time during execution

A

fixed stack-dynamic array

25
has subscript ranges and storage allocation that are both dynamically bound and can change during the array's lifetime multiple times
heap-dynamic array
26
The most common array operations are
assignment, concatenation, comparison for equality and inequality, and slices
27
is a multidimensional array in which all of the rows and columns have the same number of elements
rectangular array
28
consists of rows with different number of elements
jagged array
29
After extracting certain elements from an array, another array is produced called a ...
slice
30
is an unordered collection of data elements that are indexed by an equal number of values called keys
associative array
31
is a collection of data elements in which the individual elements are identified by names and accessed through offsets from the beginning of the structure
record
32
is a data type that is similar to a record, except that the elements are not named
tuple
33
represents are ordered sequence of values, which is usually not separated by any punctuation
list
34
is a type whose variables may store different type of values at different times during program execution
union
35
Unions in programs that are free from type checking are called ...
free unions
36
Type checking of unions requires that each union construct include a type indicator. Such indicator is called a tag, or discriminant, and a union with a discriminant is called a ...
discriminated union
37
is one in which the variables have a range of values that consists of memory addresses and a special value called nil
pointer type
38
The .. value is not a valid address and is used to indicate that a pointer cannot currently be used to reference a memory cell
nil
39
A pointer can be used to access a location in an area where storage is dynamically allocated called a ...
heap
40
Variables that are dynamically allocated form the heap are called ...
heap-dynamic variables
41
Variables without names are called ...
anonymous variables
42
Two (2) fundamental pointer operations
1. Assignment 2. Deferencing
43
variable that refers to an object or a value is memory
reference type
44
is the activity of ensuring that the operands of an operator are of compatible types
type checking
45
The process automatically converting an operator is called a ...
coercion
46
is the application of an operator to an operand of an inappropriate type
type error
47
Type checking at run time is called ...
dynamic type checking
48
A programming language is ... if type errors are always detected.
strongly typed
49
means that two (2) types are equivalent if an operand of one (1) type in an expression is substituted for one of the other type, without coercion.
type equivalence
50
two (2) approaches to defining type equivalence are
1. name type equivalence 2. structure type equivalence
51
two (2) fundamental pointer operations
1. Assignment 2. Dereferencing
52
sets a pointer variable's value to some useful address
Assignment
53
takes a reference through one (1) level of indirection
Dereferencing
54
variable refers to an object or a value is memory
reference type
55