#include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;
int main() {
int a = 3;
int* x = &a;
int** k1 = &x;
cout << a << endl;
cout << *x << endl;
cout << **k1 << endl;
cout << x << endl;
cout << *k1 << endl;
cout << k1 << endl;
return 0;
}
// -----------------------
// C 语言交换两个数字实现
#include <stdio.h>
#include <string.h>
#define BUG printf("here\n");'/
void swap(int *a, int *b) {
int temp = *a;
*a = *b;
*b = temp;
}
int main() {
int x, y;
x = 3, y = 5;
swap(&x, &y);
printf("%d %d\n", x, y);
return 0;
}