Qualcomm Interview Question: Why are unions not used all t... | Glassdoor

Interview Question

Software Engineer Interview San Diego, CA

Why are unions not used all the times in place of

  structures?
Answer

Interview Answer

1 Answer

3

The difference between Union and Structure is that a Union can have only one type at a time and all values are stored at the same memory adress. A structure can contain of multiple types of variables (stored at separate places in memory) at the same time.

Michael Henke on Mar 14, 2013

Add Answers or Comments

To comment on this, Sign In or Sign Up.