#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
void Swap(int*pa , int* pb)
{
int z =0;
z = *pa;
*pa = *pb;
*pb = z;
}
int main()
{
int a = 10;
int b = 20;
printf("交换前:a = %d b = %d\n",a,b);
Swap(&a,&b);//交换两个函数
printf("交换后:a = %d b = %d\n",a,b);
return 0;
}
标签:两个,int,变量值,交换,pb,pa,整型,include,Swap From: https://blog.51cto.com/u_13668714/5912061