#include <stdio.h> void fun(int *a,int *b) { int *k; k=a;a=b;b=k; } void fun1(int *a,int *b) { int k; k=*a;*a=*b;*b=k; } main() { int a=3,b=6,*x=&a,*y=&b; fun(x,y); printf("%d%d",a,b); printf("\n%d%d",*x,*y); fun1(x,y); printf("\n%d%d",a,b); printf("\n%d%d",*x,*y); getchar(); }
标签:变量,int,void,d%,n%,C语言,printf,指针 From: https://www.cnblogs.com/xkdn/p/16708930.html