Home » C Programming » Unions » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    union U
    {
    int m;
    char s;
    };
    int main()
    {
    union U u, uu;
    u.m = 65;
    uu.s = 32;
    printf("%d\n", u.s);
    }
    1. Compilation Error
    2. Garbage value
    3. 65
    4. 32
    5. None of these
Correct Option: C

65



Your comments will be displayed only after manual approval.