What is the use of swap() function in array class?

a) Swaps two elements of an array given elements
b) Swaps two arrays
c) Swaps two elements given indices of elements
d) Swaps same elements of the array if required

1 thought on “ What is the use of swap() function in array class?”

  1. b
    Explanation: swap() function is used to swap elements of two array classes provided the size of both arrays classes are same.

Leave a Comment