Data types
Primitive data types
• Primitive data types are those variables that can be
defined simply by commands built into the
programming language.
• Primitive data types are also known as atomic data
types.
User-Defined Data
Types
User-Defined Data Types
• The data types that are defined by the user/
programmer are called user-defined data type.
• Sometimes the primitive data types limit
programmers’ requirements therefore they end up
designing their own data types.
• There are two categories of user-defined data types:
• Composite
• Record data type
• Set data type
• Objects and classes
• Non-composite
• Enumerated data type
• Pointer data type
Composite data type
• These are data types that have one or more
fields dynamically linked to fields in another data
type (primitive data types).
• The record data type is the most useful and most
widely used.
Record data type
• is a data type that contains a fixed number of components / elements
(called fields) which can be of different data types
• - a record corresponds to a row in a table. Each field in the record is
used to store values of a certain data type. The fields are accessed
using the name of the record and the field name.
Pseudocode: Define a Record Type
TASK 1: