© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Argjend
Product Developer
Swap items up until you reach the midpoint, like this:
for (i = 0; i < sizeOfArr / 2; i++) { int temp = arr[i]; array[i] = arr[sizeOfArr - 1 - i]; arr[sizeOfArr - 1 - i] = temp; }