#include
void reverse(int *x, int len)
{
int i, n = len / 2, tem;
for (i = 0; i <= n; i++)
{
tem = x[i];
x[i] = x[len - 1 - i];
x[len - 1 - i] = tem;
}
}
int main()
{
int a[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, i;
reverse(a, 10);
for (i = 0; i < 10; i++)
printf("%d ", a[i]);
printf("\n");
return 0;
}