Important Terms: |
|
A variable
is a named memory location which temporarily stores data that can change while the program is running.
A constant is a named memory location which temporarily stores data that remains the same throughout the execution of the program.
The type
of a variable indicates what kind of value it will store.
The name of a variable is known as its
identifier.
A variable
can be given a value through an
assignment statement.
C++ recognizes eleven built-in data types
which are designated by reserved words:
char
short
float
long double
unsigned int
unsigned long |
int
long
double
unsigned char
unsigned short |
Variables of different types occupy different amounts of memory space and are described as having different sizes.
** The basic C++ types that are included in the AP Computer Science subset are
int, double,
bool and char.
|