• 2022-06-11
    If you define the swap function as follows:[br][/br]template [typename T][br][/br]void Swap(T &var1, T &var2) {[br][/br] T temp = var1;[br][/br] var1 = var2;[br][/br] var2 = temp;[br][/br]}[br][/br]You can invoke Swap using ______.
    A: Swap(1, 2)
    B: int v1 = 1, v2 = 2; Swap(v1, v2);
    C: int v1 = 1, v2 = 2; Swap(&v1, &v2);
    D: int v1 = 1; double v2 = 2; Swap(v1, v2);