1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

I con't solve it's output

Discussion in 'C' started by techme, Apr 16, 2010.

  1. techme

    techme New Member

    Joined:
    Feb 15, 2010
    Messages:
    86
    Likes Received:
    0
    Trophy Points:
    0
    int main()
    {
    int k;
    union jatin{
    int i :5;
    char j :2;
    };

    union jatin rajpal;
    k= sizeof(rajpal);
    printf("%d",k);
    return 0;
    }

    & what would be the output if instead of union in the above example if
    i'll use struct? Could anyon can explain me union behavior.
     
  2. techme

    techme New Member

    Joined:
    Feb 15, 2010
    Messages:
    86
    Likes Received:
    0
    Trophy Points:
    0
    Hello everybody
    i have find the solution of it.
    so thanks for all of yours blessings.
     

Share This Page