# Variables and Types ![rw-book-cover](https://readwise-assets.s3.amazonaws.com/static/images/article3.5c705a01b476.png) ## Metadata - Author: [[cplusplus.com]] - Full Title: Variables and Types - Category: #articles - Summary: In C++, variables are memory portions used to store values, and they must be declared with a specific type before use. The language supports various fundamental data types, like char, int, and float, which can vary in size and precision depending on the compiler. Additionally, C++ allows for different ways to initialize these variables, including using auto for type deduction. - URL: https://cplusplus.com/doc/tutorial/variables/ ## Highlights - Here is the complete list of fundamental types in C++: Group Type names* Notes on size / precision Character types `**char**` Exactly one byte in size. At least 8 bits. `**char16_t**` Not smaller than `char`. At least 16 bits. `**char32_t**` Not smaller than `char16_t`. At least 32 bits. `**wchar_t**` Can represent the largest supported character set. Integer types (signed) `**signed char**` Same size as `char`. At least 8 bits. `*signed* **short** *int*` Not smaller than `char`. At least 16 bits. `*signed* **int**` Not smaller than `short`. At least 16 bits. `*signed* **long** *int*` Not smaller than `int`. At least 32 bits. `*signed* **long long** *int*` Not smaller than `long`. At least 64 bits. Integer types (unsigned) `**unsigned char**` (same size as their signed counterparts) `**unsigned short** *int*` `**unsigned** *int*` `**unsigned long** *int*` `**unsigned long long** *int*` Floating-point types `**float**` `**double**` Precision not less than `float` `**long double**` Precision not less than `double` Boolean type `**bool**` Void type `**void**` no storage Null pointer `**decltype(nullptr)**` ([View Highlight](https://read.readwise.io/read/01jde5yhk236mkdj17717632aa))