#include <stdio.h>
void fun(int **p1,int **p2);
int main()
{
int num1 = 0,num2 = 0;
int *p1 = &num1,*p2 = &num2;
int **pp1 = &p1,**pp2 = &p2;
printf("输入两个整数:\n");
scanf("%d%d",p1,p2);
fun(pp1,pp2);
printf("%d %d\n",**pp1,**pp2);
return 0;
}
void fun(int **p1,int **p2)
{
int temp = 0;
temp = **p1;
**p1 = **p2;
**p2 = temp;
}
void fun(int **p1,int **p2);
int main()
{
int num1 = 0,num2 = 0;
int *p1 = &num1,*p2 = &num2;
int **pp1 = &p1,**pp2 = &p2;
printf("输入两个整数:\n");
scanf("%d%d",p1,p2);
fun(pp1,pp2);
printf("%d %d\n",**pp1,**pp2);
return 0;
}
void fun(int **p1,int **p2)
{
int temp = 0;
temp = **p1;
**p1 = **p2;
**p2 = temp;
}