#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/11/02 18:20:36
#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