#include #include //for setw #include using namespace std; //The two loops produce exactly the same output, //but the second loop does less work. int main() { int a[] {0, 10, 20, 30, 40, 50, 60, 70}; int n {size(a)}; cout << "The array begins at address " << &a[0] << ".\n"; cout << "Each int in the array occupies " << sizeof (int) << " bytes.\n\n"; for (int i {0}; i < n; ++i) { cout << setw(2) << a[i] << " " << &a[i] << "\n"; } cout << "\n"; for (int *p {&a[0]}; p < &a[n]; ++p) { cout << setw(2) << *p << " " << p << "\n"; } return EXIT_SUCCESS; }