第一个fun函数是把a(3)调换成a(0),还是把a(2)调换成a(1)?谢谢~
#include <stdio.h>void fun(int*s,int n1,int n2)
{
int i,j,t;
i=n1;j=n2;
while (i<j)
{ t=s[i];s[i]=s[j];s[j]=t;
i++;j--;}
}
main()
int a[10]={1234567890},k;
fun(a,0,3);fun(a,4,9);fun(a,0,9);
for(k=0;k<10;k++)
printf(“%d”,a[k]);
printf("\n");
}