October 2004
Beginner
408 pages
9h 24m
English
All of the examples in this chapter have used numeric arrays, but arrays can also store characters (which, yes, are technically integers). By creating an array of characters, you can create a string. This concept was introduced back in Chapter 2 but merits a review.
There are two important differences between character arrays and other array types. First, storing a string in a character array always requires an extra element. This extra, final element stores the terminating NULL character (\0), which marks the end of a string. Table 6.2 lists the elements for a character array called name with a value of Aubrey.
Read now
Unlock full access