#include <stdio.h>
#include <string.h>
#define PRINT_SZ(intValue) printf(#intValue" is %zd\n", (intValue));
#define STRUCT_MEMBER_OFFSET(type, member) ((char *)&((type *)0)->member - (char *)0)
/*struct Test {
char a;
short b;
int c;
};*/
struct Test {
char a;
int c;
short b;
};
int main() {
PRINT_SZ(sizeof(struct Test));
PRINT_SZ(STRUCT_MEMBER_OFFSET(struct Test, a));
PRINT_SZ(STRUCT_MEMBER_OFFSET(struct Test, b));
PRINT_SZ(STRUCT_MEMBER_OFFSET(struct Test, c));
return 0;
}