You are viewing a single comment's thread. Return to all comments →
void reverseArray(int *arr, int num) { int start = 0; int end = num - 1; int temp; while (start < end) { temp = arr[start]; arr[start] = arr[end]; arr[end] = temp; start++; end--; } }
Seems like cookies are disabled on this browser, please enable them to open this website
Array Reversal
You are viewing a single comment's thread. Return to all comments →