Examlex

Solved

Suppose the SwapValues Template Is Instantiated as Follows

question 17

True/False

Suppose the swapValues template is instantiated as follows:
int x = 2,y =3;
swapValues(x,y);
// use x and y
x = 4;y =5;
swapValues(x,y);
// use x and y
The compiler generates code for two copies of the swapValues template.


Definitions:

Related Questions