Solved

Why Can You Not Use the Swap Template Function to Swap

Question 14

Multiple Choice

Why can you not use the swap template function to swap two complete arrays?
Template <class T>
Void swapT& left, T& right)
{
T tmp=left;
Left=right;
Right=tmp;
}


A) You can not pass an array to a function
B) The swap function does not return anything
C) the = operator does not work for an array
D) tmp should be an integer

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions