• + 1 comment
    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--;
        }
    }