reply inline...
On Sun, Dec 2, 2007 at 6:48 PM, sivag9 <[EMAIL PROTECTED]> wrote:
> hi every body
> Iam having two qs, pls give me the ans
>
> int i = -1;
> give me the binary of this like 8 is having binary of 1000.
>
>
> second one
>
> union{
> int i;
> struct{
>
> int i;
> int j;
> }st;
>
> struct{
>
> char c;
> char ch[2];
> }s;
> }u;
>
> what is the size of union, how it is calculated if structers are
> inside the union.
>
>
>
>>> The size of the union in any case can be visualized as the minimum
size
required to encompass any individual datatype included in the
union
(not the addition of datatype sizes).
(here structures will be treated as no different than just
another user-defined datatype)
So now you go ahead and try it out on your own to calculate
the union size.
--
Santosh Vernekar
QLogic India
[Non-text portions of this message have been removed]