sort in descending order for given range c++ array code example Example: how to sort in descending order in c++ sort(str.begin(), str.end(), greater<int>()); cout<<str;