#include <iostream>

int main ()
{
    constexpr int N = 5 ;
    int numbers[N] = {0} ;

    std::cout << N << " elements of array numbers are located at:\n\t" ;
    for( int i=0 ; i<N ; ++i ) std::cout << &numbers[i] << ' ' ;
    std::cout << '\n' ;

    int* p = nullptr ;
    p = numbers ;
    std::cout << "after p = numbers, pointer p points to address: " << p << '\n' ;
    *p = 10;

    ++p ;
    std::cout << "after ++p, p points to address: " << p << '\n' ;
    *p = 20;

    p = &numbers[2];
    std::cout << "after p = &numbers[2], p points to address: " << p << '\n' ;
    *p = 30;

    p = numbers + 3;
    std::cout << "after p = numbers+3, p points to address: " << p << '\n' ;
    *p = 40;

    p = numbers;
    std::cout << "after p = numbers, p points to address: " << p << '\n' ;
    std::cout << "(p+4) points to address: " << p+4 << '\n' ;
    *(p+4) = 50;

    for( int v : numbers ) std::cout << v << ' ' ;
    std::cout << '\n' ;
}
