#include void main( ) { int a=3,b=5; int *p,*q; void f1(int x,int y);void f2(int *x,int *y);p=&a; q=&b;f1(*p,*q) ;printf("a=%d ,b=%d\n",a,b);f2(p,q);printf("a=%d ,b=%d\n",a,b);}void f1(int x,int y) { int t;t=x; x=y; y=t;}void f2(int *x,int *y) { int

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/22 17:57:25
#includevoidmain(){inta=3,b=5;int*p,*q;voidf1(intx,inty);voidf2(int*x,int*y);p=&a;q=&b;f1(*p,*q);pri

#include void main( ) { int a=3,b=5; int *p,*q; void f1(int x,int y);void f2(int *x,int *y);p=&a; q=&b;f1(*p,*q) ;printf("a=%d ,b=%d\n",a,b);f2(p,q);printf("a=%d ,b=%d\n",a,b);}void f1(int x,int y) { int t;t=x; x=y; y=t;}void f2(int *x,int *y) { int
#include void main( ) { int a=3,b=5; int *p,*q; void f1(int x,int y);
void f2(int *x,int *y);
p=&a; q=&b;
f1(*p,*q) ;
printf("a=%d ,b=%d\n",a,b);
f2(p,q);
printf("a=%d ,b=%d\n",a,b);
}
void f1(int x,int y)
{ int t;
t=x; x=y; y=t;
}
void f2(int *x,int *y)
{ int t;
t=*x;*x=*y; *y=t;
}
程序运行后的输出结果是:

#include void main( ) { int a=3,b=5; int *p,*q; void f1(int x,int y);void f2(int *x,int *y);p=&a; q=&b;f1(*p,*q) ;printf("a=%d ,b=%d\n",a,b);f2(p,q);printf("a=%d ,b=%d\n",a,b);}void f1(int x,int y) { int t;t=x; x=y; y=t;}void f2(int *x,int *y) { int
a=3 ,b=5
a=5 ,b=3