Data types
In a programming language, a data type can be defined in:
- A range of values and
- A set of valid operations that can apply to those values
Example:
In C++, the int
data type holds a range of values from -2,147,483,648 to 2,147,483,647. And the operations that you can do with int
values are addition, subtraction, multiplication, division, ...