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
Q

has subscript ranges and storage allocation that are both dynamically bound and can change during the array’s lifetime multiple times

A

heap-dynamic array

26
Q

The most common array operations are

A

assignment, concatenation, comparison for equality and inequality, and slices

27
Q

is a multidimensional array in which all of the rows and columns have the same number of elements

A

rectangular array

28
Q

consists of rows with different number of elements

A

jagged array

29
Q

After extracting certain elements from an array, another array is produced called a …

A

slice

30
Q

is an unordered collection of data elements that are indexed by an equal number of values called keys

A

associative array

31
Q

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

A

record

32
Q

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

A

tuple

33
Q

represents are ordered sequence of values, which is usually not separated by any punctuation

A

list

34
Q

is a type whose variables may store different type of values at different times during program execution

A

union

35
Q

Unions in programs that are free from type checking are called …

A

free unions

36
Q

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 …

A

discriminated union

37
Q

is one in which the variables have a range of values that consists of memory addresses and a special value called nil

A

pointer type

38
Q

The .. value is not a valid address and is used to indicate that a pointer cannot currently be used to reference a memory cell

A

nil

39
Q

A pointer can be used to access a location in an area where storage is dynamically allocated called a …

A

heap

40
Q

Variables that are dynamically allocated form the heap are called …

A

heap-dynamic variables

41
Q

Variables without names are called …

A

anonymous variables

42
Q

Two (2) fundamental pointer operations

A
  1. Assignment
  2. Deferencing
43
Q

variable that refers to an object or a value is memory

A

reference type

44
Q

is the activity of ensuring that the operands of an operator are of compatible types

A

type checking

45
Q

The process automatically converting an operator is called a …

A

coercion

46
Q

is the application of an operator to an operand of an inappropriate type

A

type error

47
Q

Type checking at run time is called …

A

dynamic type checking

48
Q

A programming language is … if type errors are always detected.

A

strongly typed

49
Q

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.

A

type equivalence

50
Q

two (2) approaches to defining type equivalence are

A
  1. name type equivalence
  2. structure type equivalence
51
Q

two (2) fundamental pointer operations

A
  1. Assignment
  2. Dereferencing
52
Q

sets a pointer variable’s value to some useful address

A

Assignment

53
Q

takes a reference through one (1) level of indirection

A

Dereferencing

54
Q

variable refers to an object or a value is memory

A

reference type

55
Q
A