阿神2017-04-17 14:34:34
The number of bytes occupied by the pointer is related to the number of processor bits. A 32-bit processor is 4 bytes. Although you may have a 64-bit processor, it depends on whether you are a 64-bit program, so as long as int is 4 bytes, then the pointer is still 4 bytes
天蓬老师2017-04-17 14:34:34
The pointer saves an address, not any other data. . . So the size is fixed
ringa_lee2017-04-17 14:34:34
The pointer is 4 bytes in 32-bit and 8 bytes in 64-bit.
4 bytes can represent up to 4G.
The pointer is like a house number. Whether it is a large villa or a small store, there is no difference in the house number.
It only represents an address and has nothing to do with the content of the address
阿神2017-04-17 14:34:34
The pointer points to the address. As a 32-bit machine, the address is 4*8=32 bits, that is, the pointer size under a 32-bit machine is 4;
If it is a 64-bit machine, then the address It is 8*8=64 bits, that is, the pointer size under the 64-bit machine is 8;
ringa_lee2017-04-17 14:34:34
As mentioned above, the pointer is like a house number. No matter how large a house it is pointing to, the house number always has 4 digits.