Question
Assuming that array1 and array2 are both arrays, why is it not possible to assign the contents of array2 to array1 with the following statement?array1 = array2;
Step 1
In many programming languages, arrays are reference types, meaning that they store references to the actual data rather than the data itself. Show more…
Show all steps
Your feedback will help us improve your experience
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
The arrays array1 and array2 each hold 25 integer elements. Write code that copies the values in array1 to array2.
Watch the video solution with this free unlock.
EMAIL
PASSWORD