Data Type
Definition:
Specifies the kind of data a variable can hold, such as integer, floating-point, or text.
Detailed Explanation
- Data types define the shape, size, and behavior of stored values.
- They help prevent invalid operations and allow for efficient memory usage.
- Most programming languages provide both primitive and complex data types.
Example
// Example: int for whole numbers, string for text // int score = 100; // string playerName = "Alex";