How to return array from the function quick_sort. Facing difficulty in dry running recursion in this particular sort

You dont need to return an array. You can easily sort the array you are passing in the function call automatically.
Check your functions and its loops. They are almost correct. Some typo like while(arr[j]>+pivot).
Also, the error is in the last if block of the partition function and also after the end of while loop. Check that.
One more thing, dont make partition as a separate function rather place its code in the quicksort function only. It’s because the value of l and h will get changed when the control comes back to quicksort as they are not array and passed as call by value.