What is structure padding?

Answer

When you are using C, structure padding is used to pad the data in such a way that it can be sent to external devices. Sometimes, the data is padded in such a way that it can be used on little endian vs big endian processors

======= Adding to above:

Padding is done to fast access of data from memory. Structure members are alined to based on the memory pointer size, which is normally 32bit in Win32 systems. So a character variable defined may take 4 bytes. Hence the size of sturcute is not really the sum of size individual memmbers.

Improve Answer Discuss the question "What is structure padding?" Watch Question

First answer by ShockRide. Last edit by Shiva sheela. Contributor trust: 40 [recommend contributor]. Question popularity: 56 [recommend question]

Research your answer:

Answers.com > Wiki Answers > Categories > Technology > Computers > What is structure padding?

Our contributors said this page should be displayed for the questions below. (Where do these come from)
If any of these are not a genuine rephrasing of the question, please help out and edit these alternates.
Padding in c?  Padding is made of?  How padding is done?  What is padding in C?  Structure padding in c?  What is padding in math?  How do you avoid padding?  What is meant by structure padding?  What you mean by structure padding?  What padding do you need for lacrosse?