#include <iostream>
void swapPointers(double*& num1, double*& num2) {
double* temp = num1;
num1 = num2;
num2 = temp;
}
int main() {
double a = 1.0f;
double b = 5.0f;
double* pa = &a;
double* pb = &b;
swapPointers(pa, pb);
std::cout << *pa << " " << *pb << std::endl;
std::cout << a << " " << b << std::endl;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgogCnZvaWQgc3dhcFBvaW50ZXJzKGRvdWJsZSomIG51bTEsIGRvdWJsZSomIG51bTIpIHsKICBkb3VibGUqIHRlbXAgPSBudW0xOwogIG51bTEgPSBudW0yOwogIG51bTIgPSB0ZW1wOwp9CiAKaW50IG1haW4oKSB7CiAgICBkb3VibGUgYSA9IDEuMGY7CiAgICBkb3VibGUgYiA9IDUuMGY7CiAgICBkb3VibGUqIHBhID0gJmE7CiAgICBkb3VibGUqIHBiID0gJmI7CiAgICBzd2FwUG9pbnRlcnMocGEsIHBiKTsKICAgIHN0ZDo6Y291dCA8PCAqcGEgPDwgIiAiIDw8ICpwYiA8PCBzdGQ6OmVuZGw7CiAgICBzdGQ6OmNvdXQgPDwgYSA8PCAiICIgPDwgYiA8PCBzdGQ6OmVuZGw7Cn0=