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
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
Which of the following can be a member of a structure?
A. Function
B. Another structure
C. Enumeration
D. All of the above
Join The Discussion