How does the memory alignment of a structure's members affect its total size?

  • It aligns the structure members to byte boundaries
  • It decreases the total size
  • It has no impact on the total size
  • It increases the total size
Memory alignment in structures affects the total size by ensuring that structure members are positioned on specific byte boundaries. This alignment is necessary for efficient memory access and to prevent wasted memory.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *