@Deceptikon: Back in the days of Turbo C, I remember folks saying never put an array in the arguments, and instead use its pointer AND the same thing about struct's.
While it's true for struct instances, arrays have always been passed "by pointer", even in the prehistory of C. When you pass an array to a function, a pointer to the first element is created and sent by value, so the only thing that gets copied is an address. Note also that these three declarations of the parameter are completely identical in every functional way:
void foo(int *a);
void bar(int a[]);
void baz(int a[N]);
The latter two declarations are a convenience and under the hood will be treated as if they were the first. In the last declaration, the size of the first dimension is allowed syntactically, but ignored semantically. You can verify this with a simple program that would give at least a warning if the size were meaningful:
void foo(int a[10]) { }
int main(void)
{
int arg[5];
foo(arg); /* Size mismatch? */
return 0;
}
The folks who were saying that an array parameter could be passed by value were mistaken.
I'm tempted to say that if you pass an array of specific size to a function expecting a specific size, it will pass by value, but I don't know.
That's quite impossible if we're talking about a conforming C compiler because passing by value would break the guaranteed …