Iostream don’t have the sort function in it…how sir is doing the code without using the bits librrary. becoz in my IDE sort is not declared under iostream???
#include
using namespace std;
int main()
{
int a[] = {1, 2, 4, 5, 3};
int n = sizeof(a) / sizeof(a[0]);
for (int i = 0; i < n; i++)
{
cout << a[i] << " ";
}
cout << endl;
sort(a,a+n);
for (int i = 0; i < n; i++)
{
cout << a[i] << " ";
}
return 0;
}