Consider the following program:
void doSomething(char array[5])
{
char b = 3;
array[0] = b;
return;
}
int main()
{
char array[5] = {0, 1, 2, 3, 4};
doSomething(array);
return 0;
}
My question is, when passing the array to the doSomething
function, is a copy of the array made and takes up more memory?, or is the pointer of the array simply passed, and the very same array is being modified?