struct check{
unsigned short a;
unsigned short b;
};
static unsigned char v[5] = {1,2,3,4,5};
struct check *p = (struct check *)v;
printf("%d",p->a);
printf("\t%d",p->b);
The answer is 513
and 1027
. I am not able to get why it is happening. Can anybody help me on understanding the concept.