I\'m new to C and I have a doubt.
Since C functions create local copies of it\'s arguments, I\'m wondering why the following code works as expected:
The array name is a pointer to the first element in the array. In the first code sample you have passed a pointer to the memory location containing the first array element. In the second code sample you have passed an integer by value so it has nothing to do with the local variable named "integer"
check that link
Pass by reference and pass by value
Pass by Reference / Value in C++