Quicksort using pointers
I'd make right an exclusive instead of inclusive upper bound, that is write i &lt; right instead of i &lt;= right and last - v instead of last - v - 1.

This has the advantage of making the base call qsort(v, 0, length) instead of qsort(v, 0, length - 1).