-
unsigned int pointer
Okay, so an unsigned int takes up 4 bytes in most machines (in mine it does).
Now if I do this:
Code:
cout << &anUnsignedInt << endl;
I'll get its address right? What will that address point to? The first byte of the unsigned int or the whole unsigned integer?
-
First byte (the byte with lowest address). Which may be either the most significant byte or the least significant byte, depending on endianess.
-
Kudos to you buddy, thanks
-
There is no difference between the address of the first byte and the address of the whole integer. An address is an address, the rest is up to interpretation.