#include <stdio.h>
#include <cstddef>
typedef struct {
char a;
int b;
short c;
} MyStruct;
void print_offsets() {
printf("Offset of a: %u\n", offsetof(MyStruct, a));
printf("Offset of b: %u\n", offsetof(MyStruct, b));
printf("Offset of c: %u\n", offsetof(MyStruct, c));
printf("Size: %u\n", sizeof(MyStruct));
}
int main() {
print_offsets();
return 0;
}