T
trustron
Hi all,
I have got a pointer question. I was told that a pointer is a variable
holding a memory address.
SO:
...
//I: a variable holding a memory address
unsigned char U8 = 0xFFFF;
//II: a variable holding a memory address
unsigned char* pU8 = (unsigned char*)0xFFFF;
printf("U8 = %X \n",U8);
printf("pU8 = %X \n",pU8);
...
Output:
U8 = FF
pU8 = FFFF
I understand that U8 = FF (1 byte). I do not understand why pU8 = FFFF
(2 bytes), there is only 1 byte storage, so where is this number
(FFFF) stored?
I have got a pointer question. I was told that a pointer is a variable
holding a memory address.
SO:
...
//I: a variable holding a memory address
unsigned char U8 = 0xFFFF;
//II: a variable holding a memory address
unsigned char* pU8 = (unsigned char*)0xFFFF;
printf("U8 = %X \n",U8);
printf("pU8 = %X \n",pU8);
...
Output:
U8 = FF
pU8 = FFFF
I understand that U8 = FF (1 byte). I do not understand why pU8 = FFFF
(2 bytes), there is only 1 byte storage, so where is this number
(FFFF) stored?