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

QWhat is the output of this C code(size of int and float is 4)?
    #include "stdio.h"
    union
    {
        int ival;
        float fval;
    } u;
    void main()
    {
        printf("%d", sizeof(u));
    }

ID: #2674 Union in C Language 1,415 views
Question Info
#2674Q ID
Not SetDifficulty
Union in C LanguageTopic

Choose the Best Option

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

  • A 16
  • B 8
  • C 4
  • D 32
Correct Answer

Explanation

4

Share This Question

Challenge a friend or share with your study group.