Abstract
A union is similar to a structure, but is used to store data for any one of its members at any one time. All members have the same offset. This chapter covers union definitions, initialization, compound literals, type punning, and restricted class hierarchies.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2025 The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature
About this chapter
Cite this chapter
Lucas, P.J. (2025). Unions. In: Why Learn C. Apress, Berkeley, CA. https://doi.org/10.1007/979-8-8688-1597-3_11
Download citation
DOI: https://doi.org/10.1007/979-8-8688-1597-3_11
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 979-8-8688-1596-6
Online ISBN: 979-8-8688-1597-3
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)