QUESTIONS AND CORRECT ANSWERS
Which one of the following operator cannot be overloaded in C++?
Operator+
Operator[ ]
Operator&
Operator:: - CORRECT ANSWER operator::
If itr is a vector iterator and q is of the type stored in the vector values, then which of the following is
a valid expression?
Itr = &q
Itr = *q
*itr = q; - CORRECT ANSWER *itr = q;
The following program will print all of the numbers in the vector. Choose the correct statement to
replace the yellow comment:
#include <iostream>
#include <vector>
Using namespace std;
Int main()
{
Vector<int> v = {1,2,3,4,5};
For (auto i = v.begin(); i!= v.end(); i++)
// choose the correct statement to place here
Return 0;
}