#include
//a[N] 1,2,3,4,5,6,7,8,9,10,0,0,0..
//从a[0+1]开始移动后:1,2,2,3,4,5,6,7,8,9,10,0,0..
//输出前五个:1,2,2,3,4
#define N 20
fun(int a[],int n,int m)//a[]元素后移,从a[n+1]到a[m]
{
int i;
for(i=m;i>n;i--)
a[i+1]=a[i];
return m;
}
void main()
{
int i,a[N]={1,2,3,4,5,6,7,8,9,10};
fun(a,0,N/2);
for(i=0;i