O'Reilly logo

Absolute Beginner’s Guide to C, 2nd Edition by Greg Perry

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

27. How Do I Store Lots of Data?

With Structures

image

Arrays and pointers are nice for lists of values, but those values must all be of the same data type. There will be times when you have different data types that must go together and be treated as a whole.

A perfect example is a customer record. For each customer, you would have to track a name (character array), balance (double floating-point), address (character array), city (character array), state (character array), and zip code (character array or long integer). Although you would want to be able to initialize ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required