Arrays as Function arguments
Array parameters are an exception to the “call by value” rule in C
When an array is used as an argument at a function call, the entire array is not copied, but its address only is passedExamples:- “int vec[SIZE];”: Function calls func(vec) and func(&vec[0]) are synonymous.- In “func” declaration, func(int *arr) and func(int arr[]) are synonymous too.- If only part of the array is transferred at function call: func(vec+2) and func(&vec[2]) are synonymous.- For multidimensional arrays, the above is true for the first (leftmost) index only.