Variable Types
Type | Size (bytes) |
Description | Range |
---|---|---|---|
|
4 |
Used when the data are all integers |
-2 147 483 648 to |
|
4 |
Used when the data are all positive integers and zero. |
0 to |
|
4 |
Includes all real numbers. |
|
|
1 |
Characters part of ASCII. Each character is stored as a numerical representation. Ex: ‘a’,’b’,’@’ |
Irrelevant if only used for ASCII |
|
1 |
Stores either true (1) or false (0) |
|
|
8 |
Used when the data are very large integers that go beyond the range of an integer type |
-9 quintillion to |
|
8 |
Used when the data are all very large integers that never go below 0 |
0 to 18 quintillion |
|
2 |
Smaller range of integers, uses less memory |
-32 768 to |
|
2 |
Used when the data are all small positive integers and zero |
0 to 65 535 |
|
8 |
Used when more memory is needed for a float |
C++ containers
Name | Library | Description |
---|---|---|
Arrays |
||
Vector |
|
|
Stack |
|
|
Queue |
|
|
Pair |
|
|
Map |
|