VI Building Blocks

Chapter 19
Working with Arrays
This chapter discusses arrays and how C stores array contents in memory. You are already familiar with character arrays, which are the only method for storing character strings in the C language. A character array isn't the only kind of array you can use, however. There is an array for every data type in C. By learning how to process arrays, you greatly improve the power and efficiency of your programs. C provides many ways to access arrays. If you have programmed in other computer languages, you will find that some of C's array indexing techniques are different. Arrays in the C language are closely linked with pointers. Chapter 20, ''Pointer Storage," describes the many ways pointers and arrays interact. Because pointers are so powerful, and because learning arrays well provides a good foundation for learning about pointers, this chapter describes, in detail, how C manages arrays inside your computer's memory.
This chapter teaches you the following topics:
Array names, data types, and subscripts
Initializing arrays
How to search arrays
Ordering arrays
Advanced subscripting with arrays

 



C by Example
C by Example
ISBN: 0789722399
EAN: 2147483647
Year: 1999
Pages: 43
Authors: Greg Perry

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