its 16 bytes for 32 bit computer ie 4 bytes
char occupies 1 byte and remaining 3 bytes are holes double occupies 8 bytes and int 4 bytes since double starts on a new word boundary 3 bytes are holes so its 16 On Sat, Aug 6, 2011 at 6:33 PM, SANDEEP CHUGH <sandeep.aa...@gmail.com>wrote: > struct demo > { > char c; > double d; > int s; > }; > what wud be the size of struct demo object? > > -- > 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.