Data Types

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/36

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.

37 Terms

1
New cards

Data Type

defines a collection of data values and the operations that can be performed on them

2
New cards

User-Defined Types

are custom data types created by programmers for better readability and

modifiability.

3
New cards

Abstract Data Type (ADT)

separates how a data type is used from how it is implemented. All of

the types in high-level programming language are abstract data types.

4
New cards

Type System

defines how data types are assigned to expressions, including rules for type

equivalence and type compatibility

5
New cards

Structured data types

created using type operators (constructors) to form type expressions.

These operators help define complex data structures

6
New cards

Descriptor

memory area that holds the attributes of a variable, such as type, size, and value

7
New cards

Static attributes

descriptors are used only at compile time, built by the compiler as part

of the symbol table.

8
New cards

Dynamic attributes

descriptors must be maintained during execution and used by the

run-time system.

9
New cards

Primitive data types

are the fundamental types in a programming language that are not defined

in terms of other types

10
New cards

Integer

A common primitive numeric data type that represents whole numbers.

11
New cards

Floating Point

Used to model real numbers but are approximations due to their

representation using fractions and exponents (similar to scientific notation).

12
New cards

Complex

Represents numbers as ordered pairs (real and imaginary) of floating-point

values.

13
New cards

Decimal

Stores a fixed number of decimal digits with a defined decimal point position

14
New cards

Boolean data types

store logical values:

15
New cards

Character

data represents individual symbols (letters, digits, or special characters).

16
New cards

character string

sequence of characters (letters, numbers, or symbols) used in

programming.

17
New cards

Ordinal data types

characterized by their values having a clear, sequential order, much like

the positive integers.

18
New cards

Enumeration

types are created by explicitly listing, or "enumerating," all possible values as

named constants within the type's definition.

19
New cards

Subrange types

a subset of an existing ordinal type. It defines a range of

valid values within that ordinal type.

20
New cards

Arrays

are essential building blocks in programming, serving as a primary way to organize and

work with groups of data

21
New cards

Associative arrays

unlike regular arrays, use stored, user-defined keys to link to values, forming

key-value pairs.

22
New cards

record

is an aggregate of data elements in which the individual elements are identified by

names and accessed through offsets from the beginning of the structure.

23
New cards

tuple

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

24
New cards

Lists

were first supported in the first functional programming language, LISP

25
New cards

Union types

programming allow a single variable to store values of different types at different

times.

26
New cards

Discriminated unions,

also

known as tagged unions, include an identifier (or tag) that indicates the current type of data stored.

27
New cards

free unions

also called untagged unions, do not

have such an identifier, making type tracking the programmer’s responsibility.

28
New cards

Pointer

type that holds memory addresses and a special value called nil

29
New cards

Reference types

function similarly to pointers but are designed with additional safety measures.

30
New cards

Type checking

ensures that operations in a program involve compatible data types, preventing

type-related errors.

31
New cards

explicit conversion

the programmer manually specifies a type conversion to ensure

the correct data type is used.

32
New cards

Static type checking

occurs during compilation, ensuring that all variables and

expressions are correctly typed before the program runs.

33
New cards

Dynamic type checking

occurs while the program is running, rather than during

compilation.

34
New cards

Strong typing

is a key concept in programming language design that ensures type errors

are always detected, either at compile time or run time

35
New cards

Type equivalence

refers to the rules that determine whether two types in a programming

language are considered the same

36
New cards

Type theory

significant area of study in mathematics, logic, computer science, and

philosophy

37
New cards

type system

consists of types and rules that govern their usage in programs.