Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > structure padding

Reply
Thread Tools

structure padding

 
 
sharat
Guest
Posts: n/a
 
      02-28-2007
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 .

 
Reply With Quote
 
 
 
 
Ian Collins
Guest
Posts: n/a
 
      02-28-2007
sharat wrote:
> 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.

--
Ian Collins.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Size of a structure : Structure Padding Kislay C Programming 15 07-13-2011 04:24 AM
structure padding Stephen Mayes C Programming 5 05-31-2005 03:49 AM
padding between variables in a structure junky_fellow@yahoo.co.in C Programming 6 05-18-2005 08:06 AM
structure padding phoenix C Programming 1 03-11-2005 04:21 AM
Structure padding. Amarendra C Programming 13 06-22-2004 07:59 AM



Advertisments