1.

What is the output of this program?
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
bool myfunction (int k,int L)
{
return (k }
int main ()
{
int num[] = {10, 11, 15, 13, 25};
vector<int> VectorData (num, num + 5);
partial_sort (VectorData.begin(), VectorData.begin() + 3, VectorData.end());
partial_sort (VectorData.begin(), VectorData.begin() + 2, VectorData.end(),
myfunction);
for (vector<int> :: iterator Iter = VectorData.begin(); Iter != VectorData.end(); ++Iter)
{
cout << ' ' << *Iter;
}
return 0;
}

A. 10
B. 10 11
C. 10 11 13
D. 10 11 13 15
E. 10 11 13 15 25
Answer» F.


Discussion

No Comment Found

Related MCQs