Copyright ©2004 Pearson Addison-Wesley. All rights reserved.
Using arrays in formal parameter list
void foo(int x); // sized array
Store the address of the corresponding array argument (a in previous slide) to variable x and remember it as an array of 10 elements.
void foo(int x); // unsized array
The length of the array is not specified. Since it is , the compiler does not need to allocate space for the array and therefore does not need to know the size of the array.
With this, we can pass an array of any size to function foo.
void foo(int *x); // array pointer
Function foo can take any integer array as argument.