For answering these questions, please download this PDF tutorial.
Typically this stems from the question, "what is the size of this struct"?
struct test_A
{
char a;
int b;
char c;
} x;
PDF Download
Citation:
Gautam Bhanage, "Padding versus Packing in Embedded Systems Programming", Published online at www.bhanage.com. May 2020. [PDF]
Gautam Bhanage, "Padding versus Packing in Embedded Systems Programming", Published online at www.bhanage.com. May 2020. [PDF]