Why can you not use the swap template function to swap two complete arrays?

template
void swap(T& 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


c. the = operator does not work for an array

Computer Science & Information Technology

You might also like to view...

In the readers and writers monitor presented in Fig. 6.3 why does it make sense to cascade in all waiting readers?

What will be an ideal response?

Computer Science & Information Technology

Given a text of length T and pattern of length P, how many comparisons will be performed by the naive string search algorithm?

a. T-P b. T c. P d. T*P

Computer Science & Information Technology

HTML documents are _____

a. text files b. JPG files c. PSD files d. MP3 files

Computer Science & Information Technology

You can create a copy of a layer using the File menu.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology