A data type is the specific category of information that a variable contains.
There are three basic data types used in C++: integers, floating point numbers and characters.
Integers
An integer is a positive or negative number with no decimal places.
- 259 -13 0 200
Floating Point Numbers
A floating point number contains decimal places or is written using exponential notations.
-6.16 -4.4 2.7541 10.5
Exponential notation, or scientific notation is a way of writing a very large numbers or numbers with many decimal places using a shortened format.
2.0e11 means 2*1011
C++ supports three different kinds of floating-point numbers:
- float (i.e. single precision numbers),
- double (i.e. double precision numbers)
- long double.
A double precision floating-point number can contain up to 15 significant digits.
The Character Data Type
To store text, you use the character data type. To store one character in a variable, you use the char keyword and place the character in single quotation marks.
Example:
char cLetter = ‘A’;









