-
What is the output of this program?
#include <iostream>
#include <vector>
using namespace std;
int main ()
{
vector<int> VectorData;
VectorData.push_back(45);
VectorData.push_back(55);
VectorData.front() += VectorData.back();
cout << VectorData.front() << '\n';
return 0;
}
-
- 55
- 45
- 100
- Compilation Error
- None of these
Correct Option: C
In this program, We added all the values in the vector by using front and back operation.