Question: C++ Consider the following code: void another_swap (int*& 1hs, int*& rhs) {int* temp = 1hs; 1hs = rhs; rhs = temp;} int main() {int x

C++  C++ Consider the following code: void another_swap (int*& 1hs, int*& rhs)

Consider the following code: void another_swap (int*& 1hs, int*& rhs) {int* temp = 1hs; 1hs = rhs; rhs = temp;} int main() {int x = 5, y = 10; int *a = &x, *b = &y; int **j = &a, **k = &b; another_swap (a, b);} Which values are swapped? List all that apply. (A) x and y (B) a and b (C) j and k (D) None, no values are swapped

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!