What will be the output of the following C++ code?
#include <bits/stdc++.h>
using namespace std;
int main()
{
int arr[] = { 14, 12, 15, 11, 10 };
set<int> s(arr, arr + 5);
for (auto it = s.cbegin(); it != s.cend(); it++)
cout << *it << " ";
return 0;
}
10 11 12 14 15
12 14 15
15 14 13 12 11
13 12 11
This question is part of this quiz :
C++ Set and Multiset