Chapter 14. Structures and Other Data Forms

You will learn about the following in this chapter:

  • keywords

    struct, union, typedef
    
  • Operators

    ->
    

In this chapter, you learn what C structures are and how to create structure templates and variables. Then you learn how to access the members of a structure and how to write functions to handle structures. A short look at C's typedef facility and at unions and pointers to functions concludes the chapter.

One of the most important steps in designing a program is choosing a good way to represent the data. In many cases, a simple variable or even an array is not enough. C takes your ability to represent data a step further with the C structure variables. The C structure is flexible enough in its basic form ...

Get C Primer Plus®, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.