Google News
logo
CPP - Quiz(MCQ)
What is the use of swap() function in array class?
A)
Swaps two elements of an array given elements
B)
Swaps two elements given indices of elements
C)
Swaps two arrays
D)
Swaps same elements of the array if required

Correct Answer :   Swaps two arrays


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

Advertisement