Data types
Classifications of data that define the type of values a variable can hold and the operations permitted on that data. Common data types include integer, floating-point, character, and boolean. Each data type has specific memory requirements and operational constraints. Understanding data types is crucial for writing efficient and correct programs.
Real World
A banking app like Monzo uses integers for transaction counts, floats for account balances (£12.99), booleans for fraud alerts (true/false), and strings for customer names.
Exam Focus
Always state the data type AND give a valid example value — 'integer, e.g. 42' scores higher than naming the type alone.
How well did you know this?