Every variable you define is stored in memory and thus, has a location or address. Just like you live in your home and your home has an address, similarly variables also need a home, which is memory location in this case and their home also has an address.
That address can be accessed using the ampersand operator (&) (also called the address-of operator), which denotes an address in memory. For example:
type=codeblock|id=cpp_variable_address|autocreate=cppint score = 5;cout << &score << endl;// Output 0x7ffd30e25934
This outputs the memory address of the variable score.
The memory address is not like your home address, which would be very big. Instead, the address is simply a hexadecimal number (a number in base 16). In base 10, the digits of a number are 0-9. In base 16, each digit can take the following 16 values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F. In C++, the prefix 0x is added to let you know that the number is a hexadecimal number. The value of the number starts after the 0x, which in this case is 7ffd30e25934.