1.

What is the output of this program?
 #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
void show(const vector<int>& Data)
{
for (size_t k = 0; k < Data.size(); ++k)
{
cout << Data[i] << ' ';
}
cout << endl;
}
int main()
{
vector<int> Data;
Data.push_back(2);
Data.push_back(6);
Data.push_back(6);
sort(Data.begin(), Data.end());
show(Data);
while(next_permutation(Data.begin(), Data.end()))
show(Data);
return 0;
}

A. 2 6 6
B. 6 2 6
C. 6 6 2
D. All of above
E. None of these
Answer» E. None of these


Discussion

No Comment Found

Related MCQs