struct TEST{
char a;
char b;
int c;
short d;
int *p;
};
when i do a sizeof(struct TEST), the value returned is 16.
But when i do a
sizeof (char) = 1
sizeof(int) =4;
sizeof(short) = 2;
sizeof(int *) =4;
so, should'nt the total size be , 1+1+4+2+4 = 12????
Please help.
char a;
char b;
int c;
short d;
int *p;
};
when i do a sizeof(struct TEST), the value returned is 16.
But when i do a
sizeof (char) = 1
sizeof(int) =4;
sizeof(short) = 2;
sizeof(int *) =4;
so, should'nt the total size be , 1+1+4+2+4 = 12????
Please help.