What does the addition mean in function(1,a+2) if a is an array?

arrays, c

Solution

In an expression (except when used with sizeof or &), an array name is a pointer to the first element in the array. So `a+2` is "pointer arithmetic" on that pointer, and results in a pointer to the element at offset 2. It is equivalent to `&a[2]`.

Problem

I was looking at this piece of code and I'm not sure what the addition means if "a" is an array. ``` int main(int argc, char* argv[]){ int a[] = {1, 3, 5, 7, 9}; function(1, a+2); return 0;} ``` Assume the function is already created.

Original source