#include<stdio.h>
void change(int *p,int *p1);
int main(){
int a = 5;
int b = 7;
printf("a=%d,b=%d",a,b);
int *x = &a;
int *y = &b;
change(x,y);
printf("a = %d,b = %d",a,b);
return 0;
}
void change(int *p,int *p1){
int temp = *p;
*p = *p1;
*p1 = temp;
} |
|