Home » C Programming » Unions » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    union Employee
    {
    int N;
    float F;
    };
    void main()
    {
    union Employee emp;
    emp.N = 26;
    printf("%d", emp.N);
    }
    1. Garbage value
    2. Compilation Error
    3. 26
    4. Undefined behaviour
    5. None of these
Correct Option: C

26



Your comments will be displayed only after manual approval.