MCQ Single Best Answer Not Set

QWhat is the output of this C code?

    #include <stdio.h>
    union p
    {
        int x;
        float y;
    };
    int main()
    {
        union p p, b;
        p.x = 10;
        printf("%f\n", p.y);
    }

ID: #2694 Union in C Language 518 views
Question Info
#2694Q ID
Not SetDifficulty
Union in C LanguageTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A Compile time error
  • B Implementation dependent
  • C 10.000000
  • D 0.000000
Correct Answer: Option B

Explanation

Implementation dependent

Share This Question

Challenge a friend or share with your study group.