Common User-Defined Data Types
Some common user defined data types are as follow:
Data Type | Definition | Example |
---|---|---|
Enumerated Type (enum) | Small set of predefined unique values (elements or enumerators) that can be text-based or numerical | Sunday -0, Monday -1 |
Structure | allows to combining of data items of different kinds | struct s{ …} |
Union | contains a group of data objects that can have varied data types | union u {…} |
Data Types in Programming
In Programming, data type is an attribute associated with a piece of data that tells a computer system how to interpret its value. Understanding data types ensures that data is collected in the preferred format and that the value of each property is as expected.
Table of Content
- What are Data Types in Programming?
- Common Data Types in Programming
- Common Primitive Data Types in Programming
- Common Composite Data Types
- Common User-Defined Data Types
- Dynamic vs Static Typing in Programming
- Type Casting in Programming
- Variables and Data Types in Programming
- Type Safety in Programming