The following code prints 255
, but if I assigned 0255
to x
, as in the second line, the code prints 173
!
Is there any explanation for this?
void main()
{
unsigned long x = 255;
/* unsigned long x = 0255;*/
unsigned char *ptr = &x;
printf("%u",*ptr);
getch();
}