each object in the structure will take one memory word.(if one object then its size of that object) Thank you, Sid.
On Sat, Sep 3, 2011 at 10:27 PM, Debabrata Das < debabrata.barunhal...@gmail.com> wrote: > how output is 12 on typical 32 bit system and why? > #include<stdio.h> > struct x > { > int y; > char x; > float z; > }; > main() > { > printf("%d",sizeof(struct x)); > } > > what is the rule of padding.... > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.