1.

What is the output of this program?
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main ()
{
int FirstData[] = {52, 101, 150, 200, 205};
int SecondData[] = {20, 30, 120, 200, 102};
vector<int> v(12);
vector<int> :: iterator Iter;
sort (FirstData, FirstData + 5);
sort (SecondData, SecondData + 5);
Iter = set_union (FirstData, FirstData + 5, SecondData, SecondData + 5, v.begin());
cout << int(Iter - v.begin());
return 0;
}

A. 5
B. 6
C. 7
D. 8
E. 9
Answer» F.


Discussion

No Comment Found

Related MCQs