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