1.

What is the output of this program?
#include <iostream>
#include <iterator>
#include <vector>
using namespace std;
int main ()
{
vector<int> NewVector;
for (int k = 1; k < 6; ++k)
NewVector.push_back(k * 10);
ostream_iterator<int> out_it (cout,", ");
copy ( NewVector.begin(), NewVector.end(), out_it );
return 0;
}

A. 10,
B. 10, 20,
C. 10, 20, 30,
D. 10, 20, 30, 40,
E. 10, 20, 30, 40, 50,
Answer» F.


Discussion

No Comment Found

Related MCQs