Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Shao Miller <sha0.miller@gmail.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Are struct members are also padded? |
| Date | 2011-06-12 16:13 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <it3a65$9f8$2@dont-email.me> (permalink) |
| References | <it39te$if3$1@speranza.aioe.org> |
On 6/12/2011 4:09 PM, Tech ID wrote:
> struct pad1 {
> char c1;
>
> };
>
> struct pad2 {
> char c1;
> int x;
>
> };
>
> struct pad3 {
> char c1;
> char c2;
> int x;
>
> };
>
> struct pad4 {
> char c1;
> char c2;
> int x;
> struct pad1 {
> char c1;
> };
>
> };
>
> What will be the sizeof for the structs above? (for 32-bit and 64-bit
> machines).
The sizes are implementation-defined. The answer to the subject-line's
question is implementation-defined.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Are struct members are also padded? Tech ID <tech@spamtrap.invalid> - 2011-06-12 21:09 +0000 Re: Are struct members are also padded? Ian Collins <ian-news@hotmail.com> - 2011-06-13 09:13 +1200 Re: Are struct members are also padded? Shao Miller <sha0.miller@gmail.com> - 2011-06-12 16:13 -0500 Re: Are struct members are also padded? Angel <angel+news@spamcop.net> - 2011-06-12 21:26 +0000 Re: Are struct members are also padded? Stephen Sprunk <stephen@sprunk.org> - 2011-06-12 16:32 -0500 Re: Are struct members are also padded? Keith Thompson <kst-u@mib.org> - 2011-06-12 14:39 -0700
csiph-web