Designing Your Own Data Structures
Chapter 8 introduced several new data types, such as
char. We discussed the range of each type and the format specifiers used to print each type using
printf(). Next, you explored the concept of arrays, focusing on the relationship between
char arrays and C strings. Along the way, you discovered the
#define statement, C’s text substitution mechanism. In Chapters 7, 8 and 9, you learned a lot about pointers.
This chapter will show you how to use existing C types as building blocks to design your own customized data structures. You’ll also learn how to dynamically allocate memory for those structures as you need it.
There will be times when your programs will want to bundle ...