Q:

What is meant by structure padding?

0

What is meant by structure padding?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Answer:

In the case of structure or union, the compiler inserts some extra bytes between the members of structure or union for the alignment, these extra unused bytes are called padding bytes and this technique is called padding.

Padding has increased the performance of the processor at the penalty of memory. In structure or union data members aligned as per the size of the highest bytes member to prevent the penalty of performance.

Note: Alignment of data types mandated by the processor architecture, not by language.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Embedded C interview questions and answers (2022)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
What is the endianness?... >>
<< What will be the output of the below C program?...