Programming Language Union in C Language Question #2677
Single Choice Not Set

QWhat will be the output of the program?
#include"stdio.h"

int main()
{
    union var
    {
        int a, b;
    };
    union var v;
    v.a=10;
    v.b=20;
    printf("%d\n", v.a);
    return 0;
}

ID: #2677 Union in C Language 2,040 views
Question Info
#2677Q ID
Not SetDifficulty
Union in C LanguageTopic

Choose the Best Option

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

  • A 10
  • B 20
  • C 30
Correct Answer

Explanation

20

Share This Question

Challenge a friend or share with your study group.