I have the structure
typedef struct EData
{
int a;
char c;
}
Edata obj;
a
is the integer variable so it takes 4 bytes and the c
is the char variable so it takes
1 byte, totalling 5 bytes
But when I print sizeof(obj)
it shows 8 bytes.
What is the reason?