For storing integers, C++ provides a range of data-type
possibilities, including char
, short
, int
,
and long
. C++ compiler writers are free to choose the
number of bytes associated with each type, provided that the number of
bytes for char
<= the number for short
<= the number for int
<=
the number for long
.
The char
data type ordinarily is used for storing characters, but
because character codes can be viewed as integers, char
is viewed as
one of the integral data types, along with short
, int
,
and long
.