1.

What is the output of this program?
#include <iostream>
#include <vector>
using namespace std;
int main ()
{
vector<int> VectorData (5);
for (unsigned k = 0; k < VectorData.size(); k++)
VectorData.at(k) = k;
for (unsigned k = 0; k < VectorData.size(); k++)
cout << ' ' << VectorData.at(k);
return 0;
}

A. 0 1 2 3 4
B. 0 1 2 3
C. 0 1 2
D. 0 1
Answer» B. 0 1 2 3


Discussion

No Comment Found

Related MCQs