#include #include #include using namespace std; int main() { int a[] {0, 10, 20, 30, 40, 50, 60, 70, 80, 90}; int n {size(a)}; //the number of elements in the array a //Output the address of each element in the array for (int *p {a}; p < a+n; ++p) { //a means &a[0]; a+n means &a[n] const unsigned long int ul {reinterpret_cast(p)}; cout << setw(2) << p-a << " " //the subscript of the element << setw(2) << *p << " " //the value of the element << p << " " //the address in hex ... << ul << "\n"; //... and in decimal } return EXIT_SUCCESS; }