First page Back Continue Last page Graphics
Functions & arrays (cont.)
Practice: arrfun1.cpp in prata.
- Note, that the formal parameter n receives the maximum size of the array and the formal parameter arr receives the pointer to the start of the array.
- Indexing works the same.
- total = total + arr[i];
I like the symbolic reference arr [ ] as the formal parameter because it reminds you that this argument points to an array!