R
Rohit Malaviya
Hi,
I was asked this question at a recent interview... it goes like this:
Suppose I want to manipulate an array inside a function (say, sort)...
but I do not want the changes to be reflected in the calling function.
How do I do it?
Now folks, do not tell me that I should copy the array to temp
array... using a 'for' loop... thats not the solution.
Can we somehow send the array (and not base address) such that only
values get transferred?
Thanks in Advance...
- Rohit
I was asked this question at a recent interview... it goes like this:
Suppose I want to manipulate an array inside a function (say, sort)...
but I do not want the changes to be reflected in the calling function.
How do I do it?
Now folks, do not tell me that I should copy the array to temp
array... using a 'for' loop... thats not the solution.
Can we somehow send the array (and not base address) such that only
values get transferred?
Thanks in Advance...
- Rohit