Home Segments Index Top Previous Next

595: Mainline

Next, you need to learn a little more about character arrays, previously introduced in Chapter 36. In particular, you need to know that, when you define any sort of array, the array name becomes a constant, and its value is a pointer to the first element of the array.

Thus, the input_buffer symbol is really a constant, and its value is a pointer to the first element of the input_buffer array:

    input_buffer 
    *--------*--------* 
    |00000011|10011000| 
    *--------*--------* 
     ----------------- 
             | 
     *-------* 
     |  0        1        2        3     <----- Array index 
     |  |        |        |        |   
     v  v        v        v        v 
     -------- -------- -------- -------- --- 
----*--------*--------*--------*--------*----- 
    |        |        |        |        |      
 ---*--------*--------*--------*--------*-------- 
     920      921      922      923      924