Why are arrays passed automatically by reference, unlike scalar variables?

What will be an ideal response?


It is more efficient to pass arrays in this manner. Since many arrays are large, passing an array by value would consume a great deal of the computer's memory and time because the computer would need to duplicate the array in the receiving function's formal parameter.

Computer Science & Information Technology

You might also like to view...

Data that is to be sorted in ascending order is ordered

a. from lowest value to highest value b. from highest value to lowest value c. with a binary search algorithm d. by identifying the middle value and going up and down from there e. None of these

Computer Science & Information Technology

________ is interpreted.

a. Java b. C++ c. C d. Ada e. Pascal

Computer Science & Information Technology

Both Surface covers come with a built-in ________

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Ruby is a simple yet powerful scripting language that ____.

A. Is interpreted B. Supports a natural English-like programming style C. Has light syntax requirements D. All of the above

Computer Science & Information Technology