Variables and Fundamental Types
Storage Duration and Variable Lifetime
All variables are stored in memory for a finite amount of time. That time span is known as its lifetime. The conventions defining the commencement and the expir…
Local and Global Variables
There are several scopes where we can create an object (declare a variable), and the location of this declaration determines when its name can be referenced and…
std::size_t
std::size_t is an unsigned integer type defined by the C++ standard library. It is designed to hold any kind of size, length, or count which cannot be negative.…
The sizeof Operator
The sizeof operator is used to determine how many bytes of memory an object or a type takes up. It gets resolved at compile time, therefore the code involved ne…
decltype
Sometimes you want a new variable to have the exact same type as an already existing variable or expression. To let the C++ compiler figure out that type, we us…