c, ch programming: passing the whole array
excerpted from : Computer Science : A Structured programming Approach Using C, ch8, by Forouzan and Gilberg
1. In C, the NAME of an array is a primary expression whose value is the ADDRESS of the FIRST element in the array.
2. Since indexed references are simply calculated addresses, all we need to refer to any of the elements in the array is the ADDRESS of the array.
3. Because the NAME of the array is in fact its ADDRESS, passing the array NAME as opposed to a single element, allows the called function to refer to the array back in the calling function.
11 November 2011 香港電台 - 頭條新聞
C for Engineers and Scientists :An Interpretive Approach. Author: Harry H. Cheng