C++ Variables & Constants

Identifiers
An identifier is a name supplied to the program by the programmer to be used by the program during execution.

Rules of naming identifiers

 * 1) Must not be a key word.
 * 2) Must start with a letter or underscore.
 * 3) Should not contain spaces.
 * 4) Should not exceed 64 characters.
 * 5) Use descritive names.

Variables
A variable is a named memory location whose contents may change during program execution. int score; float area; unsigned int radius;

Constants
It is a named memory location whose value does not change during program execution.

Example: const double pie = 3.14159; float const gravity = 10.8; Example 2: int main { double volume, radius; cout<<"Enter the radius"<>radius; volume = 4/3*pie*pow(radius,3); cout<<"The volume ="<
 * 2) include
 * 3) define pie 3.14159