struct node
{
char d;
short int i;
};

int main(){
   struct node a;
   printf("size = %d",sizeof(a));

}

This will give output of 4, but what i am not getting is why does the
bit specifier snippet give 4 bytes as answer when the char and int
variables have been given just 1 bit.

On Aug 6, 1:03 pm, vikas singh <[email protected]> wrote:
> On Sat, Aug 6, 2011 at 1:24 PM, Sabya Sachi <[email protected]> wrote:
> > What is meant by IMBALANCE??
> > Does that mean power of 2?
>
> struct node
> {
> char d;
> short int i;};
>
> int main(){
>    struct node a;
>    printf("size = %d",sizeof(a));
>
> }
>
> yeah... it means the same.
> See, in this code, what do you expect the PADDING would be.. try it..!
>
> --
> 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.

Reply via email to