1.

What is the output of this program?
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
bool mygreater (int i,int j)
{
return (i > j);
}
int main ()
{
int Numbers[] = {45, 55, 55, 45, 65, 45, 55, 65};
vector<int> num(Numbers, Numbers + 8);
pair<vector<int> :: iterator, vector<int> :: iterator> Bound;
sort (num.begin(), num.end());
Bound = equal_range (num.begin(), num.end(), 65);
cout << (Bound.first - num.begin());
cout << " And " << (Bound.second - num.begin());
return 0;
}

A. 6
B. 8
C. 6 And 8
D. 8 And 6
E. None of these
Answer» D. 8 And 6


Discussion

No Comment Found

Related MCQs