-
What is the output of this program?
#include <iostream>
#include <vector>
using namespace std;
int main()
{
vector<int> vect;
vect.assign( 5, 50 );
for (int k = 0; k < vect.size(); k++)
{
cout << vect[k] << " ";
}
}
-
- 50
- 50 50
- 50 50 50
- 50 50 50 50
- 50 50 50 50 50
Correct Option: E
In this program, We used the vector to print the 50 for 5 times.