// Example 1-9 - How is an array stored in memory? #include using namespace std; int main() { int array[5]; // What is the address of the array? cout << array << endl; // using array name cout << &array << endl; // using the address of operator cout << &array[0] << endl; // using address of first element // What is the address of the array? for (int i = 0; i < 5; i++) cout << &array[i] << " "; cout << endl; // Display addresses as a decimal number cout << reinterpret_cast(array) << endl; for (int i = 0; i < 5; i++) cout << reinterpret_cast(&array[i]) << " "; cout << endl; }