Vidyalelo
C++ Programming · Q607

C++ miscellaneous

Programming · C++ Programming · question 607

Q607

What will be the output of the following C++ code? #include #include #include using namespace std; int main() vector ar = 1, 2, 3, 4, 5 ; vector ::iterator ptr = ar.begin(); ptr = next(ptr, 3); cout << *ptr << endl; return 0;

A.
1
B.
2
C.
3
D.
4
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board