//Introduction to pointers. Demonstrate how a pointer can travel through every memory location of an array. #include #include using namespace std; int main () { int numbers[3]; int * p; //declaration of a pointer. p = numbers; //settling the memory location for the pointer here is the array numbers. *p = 10; // Now we have filled the 'value' at the memory location with the int 10. cout << numbers[0] << " "<< endl; // Just to confirm we print this to the screen. p++; //Hopping to the next memory location of the array numbers. *p = 20; // Putting a value there in. cout << numbers[1] << endl; //confirming the expected output. p++ ; *p= 3; cout << numbers[2] << endl; //Just a recursive repetition of what we saw above! return 0; }