What is the use of swap() function in array class?
Swaps two arrays
Swaps same elements of the array if required
Swaps two elements given indices of elements
Swaps two elements of an array given elements
(A) Swaps two arrays
Explanation:
swap() function is used to swap elements of two array classes provided the size of both arrays classes are same.