#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;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgogCnZvaWQgc3dhcFBvaW50ZXJzKGRvdWJsZSoqIG51bTEsIGRvdWJsZSoqIG51bTIpIHsKICBkb3VibGUqIHRlbXAgPSAqbnVtMTsKICAqbnVtMSA9ICpudW0yOwogICpudW0yID0gdGVtcDsKfQogCmludCBtYWluKCkgewogICAgZG91YmxlIGEgPSAxLjBmOwogICAgZG91YmxlIGIgPSA1LjBmOwogICAgZG91YmxlKiBwYSA9ICZhOwogICAgZG91YmxlKiBwYiA9ICZiOwogICAgc3dhcFBvaW50ZXJzKCZwYSwgJnBiKTsKICAgIHN0ZDo6Y291dCA8PCAqcGEgPDwgIiAiIDw8ICpwYiA8PCBzdGQ6OmVuZGw7CiAgICBzdGQ6OmNvdXQgPDwgYSA8PCAiICIgPDwgYiA8PCBzdGQ6OmVuZGw7Cn0=