-
What is the output of this program?
#include <iostream>
#include <iterator>
#include <vector>
using namespace std;
int main ()
{
vector<int> Number;
for (int k = 0; k < 100; k++)
Number.push_back(k);
typedef vector<int> :: iterator iter_int;
reverse_iterator<iter_int> rev_iterator;
rev_iterator = Number.rend() - 6;
cout << *rev_iterator << endl;
return 0;
}
-
- 100
- 6
- 5
- Compilation Error
- None of these
Correct Option: C
In this program, We are using the referencing operator and it can print the value currently pointing it.