Examveda

What happens when you assign a value to one member of a union and then access another member in C?

A. It's allowed and safe

B. It leads to undefined behavior

C. It raises a compilation error

D. It swaps the values of both members

Answer: Option B


This Question Belongs to C Program >> Structure And Union

Join The Discussion

Related Questions on Structure and Union