想让数组逆置失败,为什么失败了,哪里出错了,求高手指点
int main() //想让数组逆置失败,为什么失败了,哪里出错了,求高手指点{
int buf[10] = { 99,89,54,67,1,21,5,76,90,32 };
int low = 0;
int high = 0;
while (low < high)
{
int tmp = buf[low];
buf[low] = buf[high];
buf[high] = tmp;
low++;
high--;
}
for (int i = 0; i < 10; i++)
{
printf("%d\n", buf[i]);
}
getch(); return 0;
}