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

100



Your comments will be displayed only after manual approval.