I have a small question about the code's output.
the output i get is:Code:main() { struct data { unsigned char first; unsigned short int second; } *info; char *msg; int i; msg = (char *) malloc(sizeof(struct data)); info = (struct data *) msg; info->first = 0x4a; info->second = (unsigned short int)0x4d5e; for (i=0; i<sizeof(struct data); ++i) printf("%x\n", msg[i]); }
4a
0
5e
4d
why do i have a 0 after 4a?
thank you.