with this code
Code: Select all
#include <stdio.h>
struct A
{
int a;
short b;
};
struct B
{
int a;
short b,c;
};
int main()
{
printf("%d %d\n",sizeof(struct A),sizeof(struct B));
return 0;
}
can anyone explain ?
and this
Code: Select all
#include <stdio.h>
struct A
{
long long a;
short b;
};
struct B
{
long long a;
short b,c;
};
int main()
{
printf("%d %d\n",sizeof(struct A),sizeof(struct B));
return 0;
}
can someone please explain ?