



#include<stdio.h>
#include<stddef.h>
int main()
{
struct ALIGN
{
char a;
int b;
char c;
};
struct ALIGN1
{
int b;
char a;
char c;
};
printf(" sizeof(struct ALIGN) =%d\n",sizeof(struct ALIGN) );
printf("offsetof(struct ALIGN, a) = %d\n", offsetof(struct ALIGN, a));
printf("offsetof(struct ALIGN, b) = %d\n", offsetof(struct ALIGN, b));
printf("offsetof(struct ALIGN, c) = %d\n", offsetof(struct ALIGN, c));
printf(" sizeof(struct ALIGN1) =%d\n",sizeof(struct ALIGN1) );
printf("offsetof(struct ALIGN1, b) = %d\n", offsetof(struct ALIGN1, b));
printf("offsetof(struct ALIGN1, a) = %d\n", offsetof(struct ALIGN1, a));
printf("offsetof(struct ALIGN1, c) = %d\n", offsetof(struct ALIGN1, c));
getchar();
return 0;
}