Computer Science, asked by jain5754, 1 year ago

How to return an array from a function in C++?

Answers

Answered by kvjkarthik
0

Answer:

If the array's name is 'arr' , then it can be simply passed by using the keyword return followed by arr ----->  return arr;

Explanation:

return is a keyword that is used to return a value or a value stored in a variable who's data type is predefined in the class definition or class signature.

Hence we can use return keyword along with array name.

Similar questions