例如,一维数组中的原始内容为1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, P的值为6。移动后,一维数组的内容应为7, 8, 9, 10, 11, 12, 13, 14, 15, 1, 2, 3, 4, 5, 6。
请勿改动主函数main和其他函数中的任何内容,仅在函数fun的花括号中填入所编写的若干语句。
define N 80
void fun(int *w, int p, int n)
{
}
main()
{
int a[N]=(i, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
int i, P, n=15;
printf("The original data:/n");
for(i=0; i<n; i++)
printf("%3d", a[i]);
printf("/n/nEnter p: ");
scanf("%d", &p);
fun(a, P, n);
printf("/nThe data after moving:/n");
for(i=0; i<n; i++)
printf("%3d", a[i]);
printf("/n/n");
}