The below program takes an array as input and prints the sorted array. The header <algorithm> defines a collection of functions especially designed to be used on ranges of elements.sort function takes two arguments. The arguments are the start index and end index of array. This header file does not work in c. It can be only used in C++.
using namespace std;
cout<<"Enter number of elements you want to sort : ";
Developer, Tinkere, a proud Dad.. love to spend my available time playing with Tech!!
Set your Author Custom HTML Tab Content on your Profile page