-In C/C++, no, you must return a pointer to the array. In Java, yes.It is quite common for a function to return a pointer to an array.
In C and C++ you can wrap the array in a structure and return that.
What language?
With Java, yes it's easy.
With C++ you can use call by reference and so, if effect, yes. You can also return a pointer to an array.
Yes, some programming languages support that.
What programming language do you use?
In C#, you can
Yes, but it varies from language to language.
没有评论:
发表评论