ABSTRACT

This chapter introduces two new types: structures and unions. Like arrays, structures and unions group a set of values into a single entity. Both help to organize data in a more natural way. However, their properties are quite different from an array’s. Unlike arrays, the members of a structure or union may have different types. Furthermore, to access a member of a structure or union, we specify its name, not its position. This chapter discusses how to declare structures and unions types, declare variables, and perform operations on them.