Arrays with Character
In This Chapter
Introducing the null-terminated character array
Creating an ASCIIZ array variable
Examining two example ASCIIZ manipulation programs
Reviewing some of the most common built-in ASCIIZ library functions
In Chapter 15, which introduces the concept of arrays, the example program collects values into an integer array, which is then passed to a function to display and to a separate function to average. However, as useful as an array of integers might be, far and away the most common type of array is the character array. Specifically something known as the ASCIIZ character array, which is the subject of this chapter.
The ASCII-Zero Character Array
Arrays have an inherent problem: You can never know, just by looking at the array, how many values are actually stored in it. Knowing the size of an array is not enough. That tells you how many values the array can hold, not how many it actually does hold. The difference is like the difference between how much gas your car’s tank can hold and how much gas it actually has. Even if your tank holds ...