-
What is the output of this program?
#include <iostream>
#include <vector>
using namespace std;
int main ()
{
vector<int> FirstData (4, 2);
vector<int> SecondData (6, 5);
SecondData = FirstData;
FirstData = vector<int>();
cout << "Size of First Data " << int(FirstData.size()) << '\n';
cout << "Size of Second Data " << int(SecondData.size()) << '\n';
return 0;
}
-
- Size of First Data 0
- Size of Second Data 4
Size of First Data 0 - Size of First Data 0
Size of Second Data 4 - Size of Second Data 4
- None of these
Correct Option: C
In this program, We are finding the size of the vector elements.