In an embedded system, memory is a critical resource, and data alignment can significantly impact performance. Consider the following structure used to represent a hardware register:
struct Register
{
uint16_t control; // 2 bytes
uint8_t status; // 1 byte
uint32_t data; // 4 bytes
};
a) Calculate the size of this structure and describe the padding added by the compiler.
b) Explain how you could use `#pragma pack` to reduce the memory footprint of the structure. What are the trade-offs involved in this approach in the context of embedded systems?
c) Write a C code snippet that uses `#pragma pack` to pack the structure, ensuring no unnecessary padding is added.