第 1 楼
anonymous 发表于 2012/3/12 17:00:08 #include <stdio.h>
void swap(int *a,int *b)
{
int tmp;
tmp=*a;
*a=*b;
*b=tmp;
}
int main(int *argc,int **argv)
{
int a=2;
int b=3;
printf("Before swap a=%d b=%d\n",a,b);
swap(&a,&b);
printf("After swap a=%d b=%d\n",a,b);
return 0;
}