Given this struct:
typedef struct {
char a; // 1 byte
int b; // 4 bytes
char c; // 1 byte
short d; // 2 bytes
} Padded;
Implement `get_padded_size()` that returns its actual size in bytes (with compiler padding), and `get_packed_size()` that returns the size of the same struct declared with `__attribute__((packed))`.
Why it matters: Misunderstanding padding causes bugs when using DMA, when sending structs over UART, or when interpreting hardware register maps.
typedef struct {
char a; // 1 byte
int b; // 4 bytes
char c; // 1 byte
short d; // 2 bytes
} Padded;
get_packed_size() == 8get_padded_size() >= get_packed_size()get_padded_size() == 12