1.

What is the output of this program?
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main ()
{
vector<int> num (6);
fill (num.begin(), num.begin() + 3, 6);
fill (num.begin() + 3,num.end() - 3, 5);
for (vector<int> :: iterator Iter = num.begin();
Iter != num.end(); ++Iter)
cout << ' ' << *Iter;
return 0;
}

A. 6 6
B. 6 6 6
C. 6 6 6 0 0 0
D. 0 0 0
E. 0 0
Answer» D. 0 0 0


Discussion

No Comment Found

Related MCQs