if you declare and initialize an array in main and give it as a parameter over to another function 'reverse' and make it point there to another array... why does it still point to the original array once this function 'reverse' has finished?
I'm giving the array variable which is declared in main over to another function (printArray).
There I'm making it point to another array declared there. When I'm back in main and print the contents of the array, it prints 1, 2, ...,7.
I'm not getting this. I would understand, if it would print nonsense stuff, because the newArray was declared in reverse and when reverse is finished, then newArray 'doesnt exist anymore'...so array would point to some non-defined memory-area.... but it prints 1, 2, ... , 7.... the values it was initialized with before reverse was called.
I know, the answer is probably very simple but I need some help right now...