Possible Duplicate:
Why isn't sizeof for a struct equal to the sum of sizeof of each member?
Hi all,
i wanted to know how size of below structure comes out to be 24.As per my calculation it should be 20.and one more thing is there any way this structure is taking size of its variable t into account??
Please ignore any syntax error and i am on 32 bit machine
struct structc
{
char c;
double d;
int s;
} t;
main()
{
printf("sizeof(structc_t) = %d\n", sizeof(t));
}