A pointer is a variable that holds the address of another memory location.
Now if you are running on a 32-bit architecture, the CPU's registers that hold memory references(and most likely, all other registers too) will be of 32-bit length; that's basically what's meant by 32-bit(the registers are of 32-bit word length) and hence a pointer(which is a memory location) would usually be 32-bits long(4 bytes)
Same applies to 64-bit CPUs, and hence the pointers in a C program compiled for 64-bit CPUs will usually have 8 bytes length(64 bits)
EDIT:
Please also note that in most modern architectures you don't really address physical memory with your code; you run and address what's called a Virtual Memory.
The basic concept is that the CPU/OS combination illude your program that you have the full address space for you.
Again, the address-space(the space you can address in memory) length will depend on how far the CPU can address locations and that (in the general case) would depend on its word-size.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…