运行有错误也~~
/* Note:Your choice is C IDE */#include "stdio.h"
void f(int *x,int *y)
{
int t;
t=*x;
*x=*y;
*y=t;
return;
}
main()
{
int a[8]={1,2,3,4,5,6,7,8};
int i=0;
int *p,*q;
p=a;
q=&a[7];
while(p)
{
printf("2 ");
f(p,q);
p++;
q--;
}
for(i=0;i<8;i++)
printf("%d,",a[i]);
}
各位帮忙解决下呵~~~