padding should depend on m/c size according to my logic.... On Sat, Aug 6, 2011 at 9:32 PM, sukran dhawan <sukrandha...@gmail.com>wrote:
> it all depends on word size of the computer.since int by default is equal > to word size and double usually occupies 8 bytes all of these start from a > new memory boundary.so if only part of it filled rest of them will be > holes.tat is the whole reason why structures cannot be compared for equality > and its a syntax error > > On Sat, Aug 6, 2011 at 9:28 PM, Aditya Virmani > <virmanisadi...@gmail.com>wrote: > >> i guess it depends on ur system configuration...for 32 bit >> machines...respective sizes allocated would be 4,4,8 :giving 16 >> & on 64 bit machines it wud be 8,8,8: giving 24. Correct me if i am wrong. >> >> >> On Sat, Aug 6, 2011 at 9:24 PM, SANDEEP CHUGH <sandeep.aa...@gmail.com>wrote: >> >>> @ sukran , nitish : >>> guys, i dnt knw about the output from these online compliers.. >>> >>> >>> On Sat, Aug 6, 2011 at 9:20 PM, SANDEEP CHUGH >>> <sandeep.aa...@gmail.com>wrote: >>> >>>> >>>> @payel : according to u,,starting address cannot be 4.. ok. >>>> but wat if i hav used the following structure before that structure >>>> >>>> struct demo1 >>>> { >>>> char a; >>>> int b; >>>> char c; >>>> >>>> } >>>> >>>> >>>> On Sat, Aug 6, 2011 at 9:06 PM, Nitish Garg >>>> <nitishgarg1...@gmail.com>wrote: >>>> >>>>> Why does Ideone https://ideone.com/1Uwxx gives 16? >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Algorithm Geeks" group. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msg/algogeeks/-/L-zANxDDTUQJ. >>>>> >>>>> 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. >>> >> >> -- >> 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. > -- Saurabh Singh B.Tech (Computer Science) MNNIT ALLAHABAD -- 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.