#include #include struct items { int a; char b; int c; char d; } __attribute__((packed)); int main(){ int a = 5; printf("A stack address: %lx\n", &a); int *b = malloc(sizeof(int)); printf("A heap address: %lx\n", b); printf("A code segment address: %lx\n", &main); struct items i; printf("Pieces of i, and their addresses\n"); printf("a: %lx\n", &i.a); printf("b: %lx\n", &i.b); printf("c: %lx\n", &i.c); printf("d: %lx\n", &i.d); printf("sizeof(i) = %d\n", sizeof(i)); return 0; }