What exactly is a pointer variable? it's a variable that holds the address of another variable, function or data. We'll return to function pointers in another lesson, but in this lesson you'll learn about defining and using pointers to variables and data.
Architecture Lesson
Most computers have a large block of RAM. Programs are loaded into part of this RAM, and a small part (typically 1MB) is used to hold local (stack) variables and return addresses and the remainder (or a part of it) is used for general storage and is called the heap.The program itself is laid out in memory in sections, mainly consisting of program code, initialized data (strings etc) and space for variables. On Windows, the format of files is called Portable Executable and is used for object code, executables and dlls in 32 and 64 bit systems. .NET uses an extended version of PE. Linux uses ELF (Executable and Linking Format).
Because Operating Systems run multiple programs at once, the program code never runs at a fixed address in RAM but can be relocated by the system. While C++ includes an operator to give the address of a variable, you can never rely on that address being the same every time you run the program. It is probably the same relative to the start of the program but the program may be relocated by the Operating System.
We don't usually have to worry about the impact of architecture, but the address in a pointer can change between runs but should stay the same within one run of an application.
On the next page : Allocating memory

