#include <stdio.h>
#include <string.h>
#include <ctype.h>
void swap(int *px, int *py)
{
int temp;
temp = *px;
*px = *py;
*py = temp;
}
int main()
{
int a =3;
int b = 5;
swap(&a, &b);
printf("交换后的a为%d,b为%d",a,b);
}
#include <stdio.h>
#include <string.h>
#include <ctype.h>
void swap(int *px, int *py)
{
int temp;
temp = *px;
*px = *py;
*py = temp;
}
int main()
{
int a =3;
int b = 5;
swap(&a, &b);
printf("交换后的a为%d,b为%d",a,b);
}