Examlex

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;
}


Definitions:

Slave States

States in the U.S. before 1865 where the institution of slavery was legally permitted.

Union Army

The land force that fought for the Northern states during the American Civil War, opposing the Confederacy and fighting to preserve the Union and end slavery.

Steamer Planter

A Confederate steamship hijacked in 1862 by Robert Smalls, an enslaved African American who then sailed it to freedom and surrendered it to the Union.

Robert Smalls

An African American who escaped slavery to become a Union naval hero and later a US Congressman.

Related Questions