Given below are three implementations of the swap() function in C++: Which of…

UGC NET 2018

Given below are three implementations of the swap() function in C++:

Which of these would actually swap the contents of the two integer variables p and q?

  1. A.

    (a) only

  2. B.

    (b) only

  3. C.

    (c) only

  4. D.

    (b) and (c) only

Attempted by 210 students.

Sign up free to check your answer

Sign up free

Explore the full course: Uppsc Polytechnic Lecturer 2025 Cs

Loading lesson…