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

PYQ 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: Nta Ugc Net Paper 2

Loading lesson…