Chapter 14. STRUCTURES AND OTHER DATA FORMS

I l @ ve RuBoard

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 to represent a diversity of data, and it enables you to invent new forms. If you are familiar with the "records" of Pascal, you should be comfortable with structures. If not, this chapter will introduce you to C structures. Let's study a concrete example to see why a C structure might be needed and how to create and use one.

I l @ ve RuBoard


C++ Primer Plus
C Primer Plus (5th Edition)
ISBN: 0672326965
EAN: 2147483647
Year: 2000
Pages: 314
Authors: Stephen Prata

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net