1.

What is the output of this program?
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
bool Function(int k, int L)
{
return (k < L);
}
struct ObjectClass {
bool operator() (int k, int L)
{
return (k < L);
}
} StructObject;
int main ()
{
int arr[] = {112, 125, 101};
vector<int> Number(arr, arr + 3);
sort (Number.begin(), Number.begin() + 2);
sort (Number.begin() + 1, Number.end(), Function);
sort (Number.begin(), Number.end(), StructObject);
for (vector<int> :: iterator Iter = Number.begin(); Iter != Number.end(); ++Iter)
cout << ' ' << *Iter;
return 0;
}

A. 101 112 125
B. 101 112
C. 101
D. Compilation Error
E. None of these
Answer» B. 101 112


Discussion

No Comment Found

Related MCQs