sort an array in the descending order stl code example Example: sort in descending order c++ stl sort(arr, arr + n, greater<int>())