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

99



Your comments will be displayed only after manual approval.