Solved

Why Can You Not Use the Swap Template Function to Swap

Question 29

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents