How structs in C are saved in the memory?
Why sometimes the struct length in the memory is bigger than expected?
See Question&Answers more detail:osHow structs in C are saved in the memory?
Why sometimes the struct length in the memory is bigger than expected?
See Question&Answers more detail:osThat's called data structure alignment.
Although not a perfect duplicate, you can find a good explanation of this in C at Structure padding and packing