将一个数组逆序放到原来数组中
int main()
{
int a[] = {1,2,3,4,5,6,7,8,9,10,11,12};
int s = sizeof(a) / sizeof(a[0]);
for (int i = 0; i < s / 2; i++)
{
int x = a[s - 1 - i];
a[s - 1 - i] = a[i];
a[i] = x;
}
for (int i = 0; i < s; i++)
{
printf("%d ", a[i]);
}
system("pause");
return 0;
}