Quote Originally Posted by learncode View Post
when I use the sizeof operator to get the size of a structure
it returns a size too large why is this?
Structures are typically padded with additional bytes for alignment purposes.

Unless the structure members are sized and ordered with perfect alignment, or you go out of your way to pack the structure, having a larger size than the sum of each member's size is expected.