// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
#include <cstdlib>

using namespace std;

int main()
{
    int v[] = { 1, 2, 3 }; 
    int *a = v;
    a[1] = 4;
    a = NULL;
    const int *b = v;
    b[1] = 4; // error
    b = NULL;
    int *const c = v;
    c[1] = 4;
    c = NULL; // error
    const int * const d = v;
    d[1] = 4; // error
    d = NULL; // error
    return 0;
}
