The Idea of a Variable

A variable gives us the ability to store values for later use in a program. We can do computations to create these values and then use the values later.
A variable has three characteristics: a name, a type and a value.
The name and type are determined by the declaration and cannot be changed later. The value is usually set by the assignment statement, although other statements may also change the value of a variable. A variable can have many values during the course of a run, but only one at a time.
You may choose one of the following options to read more about each of these:
a) Why do we need variables?
b) Declaring a variable
c) The simple assignment statement
d) Explaining names, types and values of variables
e) Understanding operators
f) Input and Output of Variables
g) Revisit variable declaration
h) Revisit the assignment statement
x) return to the C++ foyer

Why do we need variables?
Variable Declaration
The Assignment Statement
The Three Characteristics of Variables
Understanding Operators
Input and Output of Variables
Declaring Variables Revisited
Practice with the assignment statement
C++ foyer