/**
*反转数组中的元素,count为数组元素的个数
*/
void reverseArray(int inarray[],int count) {
int temp, i, j, k = (count - 1) / 2;
for (i = 0; i < k; i++) {
j = count - 1 - i;
temp = inarray[i];
inarray[i] = inarray[j];
inarray[j] = temp;
}
}
数组反转
最新推荐文章于 2021-07-28 01:52:42 发布
2468

被折叠的 条评论
为什么被折叠?



