Type |
Application |
Example |
Notes |
int |
store a whole number value |
|
An attempt to store a decimal value in an int variable truncates or chops off the values after the decimal point. |
double |
store a value with decimals |
 |
Another data type for decimals is float , but it has less precision (room for values after the decimal). |
char |
store a single character value |
 |
A char variable can store anything that can be typed on a keyboard. They're stored in memory as special versions of whole numbers: https://www.asciitable.com/. |
_Bool |
store a true or false value |
 |
In our code, we'll use 1 to represent true and 0 to represent false. |