Possible Duplicate:
Why isn't sizeof for a struct equal to the sum of sizeof of each member?
If I implement below code, my output of sizeof(*zip) is 56. [10 + 10 + 4 + 4*8]byte = 56
typedef struct{
char a[10];
char b[10];
int c;
double d,f,g,h;
}abc_test;
abc_test zip[] =
{
{"Name" ,"Gender", 0,100,200,300,400},
{"Name" ,"Gender", 0,100,200,300,400}
};
But when I implement below code, my output of sizeof(*zip) is 440. [100 + 100 + 100 + 100 + 4 + 4*8] = 436, my question is where is another 4?
typedef struct{
char a[100];
char b[100];
char i[100];
char j[100];
int c;
double d,f,g,h;
}abc_test;
abc_test zip[] =
{
{"Name" ,"Gender","age","mode", 0,100,200,300,400},
{"Name" ,"Gender","age","mode", 0,100,200,300,400}
};