The memory allocated for a struct is equal to the sum of the memory of its individual members, considering _______. 

  • padding 
  • initialization 
  • inheritance 
  • encapsulation
Memory alignment requirements can cause "padding" between members of a struct, which can increase the total memory size of the struct. This is essential for data to be accessed in an optimized manner on the hardware.
Add your answer
Loading...

Leave a comment

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