@sandeep I have executed it on gcc, it's showing 16 bytes(earlier post, the address too) ... I'm sure now, this thing is PURILY compiler dependent.. and it's your code buddy, not mine. ;)
On Sat, Aug 6, 2011 at 7:37 PM, SANDEEP CHUGH <[email protected]>wrote: > > i hav executed ur code on dev c++.. i m getting correct out put as 24. > when i hav executed ur code on turbo version it shows 11 ,i.e it is doing > no padding at all.. > On Sat, Aug 6, 2011 at 7:21 PM, vikas singh <[email protected]> wrote: > >> @sandeep >> >> >> size = 16 address=3220095484 >> size = 16 address=3220598412 >> size = 16 address=3214020060 >> size = 16 address=3214400060 >> size = 16 address=3216088732 >> size = 16 address=3220983548 >> size = 16 address=3219062412 >> size = 16 address=3214817228 >> >> >> >> this is my continuous execution of your code >> struct node >> >> { >> char c; >> double d; >> int s; >> }; >> int main(){ >> struct node a; >> struct node *p; >> p=&a; >> printf("size = %d \t address=%u", sizeof(a), p); >> } >> >> I don't know why you said 24 in the thread.. is it compiler dependent ?? >> >> -- >> Thanks and Regards >> VIKAS SINGH >> MCA- final year >> NIT DURGAPUR >> email: >> [email protected] >> [email protected] >> http://smrit.wordpress.com >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Thanks and Regards VIKAS SINGH MCA- final year NIT DURGAPUR email: [email protected] [email protected] http://smrit.wordpress.com -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
