Thanks to visit codestin.com
Credit goes to link.springer.com

Skip to main content

Unions

  • Chapter
  • First Online:
Why Learn C
  • 8 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+
from £29.99 /Month
  • Starting from 10 chapters or articles per month
  • Access and download chapters and articles from more than 300k books and 2,500 journals
  • Cancel anytime
View plans

Buy Now

Chapter
GBP 19.95
Price includes VAT (United Kingdom)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
GBP 43.99
Price includes VAT (United Kingdom)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
GBP 54.99
Price includes VAT (United Kingdom)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2025 The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

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

Publish with us

Policies and ethics