Section 1 - Numeric Types
2B.1.1 Integer Types

You have already seen the int data type. When we explored the exciting statements
int someNumber; someNumber = -7; someNumber = (someNumber - 2) / 3;
we were working with int variables and int values. An int variable can hold a whole number in the range -2,147,483,648 to +2,147,483,647 but it is not guaranteed. .
If we want to be sure that we have access to the largest range of integers, we can use the long data type:
long s;
Now s can hold the largest possible type on that operating system, and always at least 2.1 billion. Of course, a long variable is still capable of working on the usual integers, but it can usually go higher (or lower) if we need it to. long constants are distinguished from int constants by the letter L (or l) after the number. For example, using our long variable, s, declared above we can make the following assignments:
s = 123456789123456789L; s = -1L;
The latter assignment statement could have been written without the L, because the compiler would take an ordinary -1 and convert it to the longer format for you.
You can also force an integer to be shorter than usual by using the short data type:
short s;
In this case, s can only hold integers in the range -32,768 to 32,767. The only reason to use shorter integers is to save memory. If you have an array of billions of integers, you would want each one to be as short as possible (we will get to arrays later).
So there are three different primitive types, int, long and short, which are all members of the integer data type family.
When sending any integer type to the screen through a cout method, you can forget about what type they are and just insert them into the output stream:
short shrt; long pants; shrt = -1; pants = 123456789L; cout << "shrt is " << shrt << " and pants is " << pants ; /* ------------ paste of output ------------- shrt is -1 and pants is 123456789 ------------------------------- */