structure padding

S

sharat

hi groups.

what is structure padding exactly ?how the alignment will done
exactly?
example :
struct ex
{
double d1;
char c1;
};
sizeof above structure is 12.why?
i expected 16.

can any body explain.

thanx in advance .
 
I

Ian Collins

sharat said:
hi groups.

what is structure padding exactly ?how the alignment will done
exactly?

Search the group's archives, this is asked at least once a week.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top