MCQ Single Best Answer Not Set

QWhat is the output of this C code?

    #include <stdio.h>
    union p
    {
        int x;
        char y;
    }k = {1, 97};
    int main()
    {
        printf("%d\n", k.y);
    }

ID: #2692 Union in C Language 623 views
Question Info
#2692Q 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 97
  • C a
  • D 1
Correct Answer: Option D

Explanation

1

Share This Question

Challenge a friend or share with your study group.