下列程序的输出结果是()。void f(int*x,int*y){int t;t=*x,*x=*y;*y=t;}main(){int a[8]={1,2,3,4
15 查阅
下列程序的输出结果是( )。 void f(int*x,int*y) {int t; t=*x,*x=*y;*y=t; } main() {int a[8]={1,2,3,4,5,6,7,8},i,*p,*q; p=a;q=&a[7]; while(p<q) {f(p,q);p++;q--;} for(i=0;i<8;i+)printf("%d,",a[i]); }
A.8,2,3,4,5,6,7,1
B.5,6,7,8,1,2,3,4
C.1,2,3,4,5,6,7,8
D.8,7,6,5,4,3,2,1
参考答案: