Variables & Data Types

Variables store data while a program runs, and every variable has a data type. You will learn the main data types, such as integer, real, string, char and Boolean, and how to choose sensible variable names.

Key terms

Variable
A named storage location whose value can change while the program runs.
Integer
A data type for whole numbers.
Boolean
A data type with only two possible values: TRUE or FALSE.
Data type
Controls how data is stored and what can be done with it.

Part of Programming.