C++ Containers Question:

Tell us what you know about Iterator class?

Tweet Share WhatsApp

Answer:

A container class hold group of objects and iterator class is used to traverse through the objects maintained by a container class. The iterator class provides access to the classes inside a container. They are objects that point to other objects. Iterator points to one element in a range, and then it is possible to increment it so that it points to the next element.

There are several different types of iterators:

input_iterator
output_iterator
forward_iterator
bidirectional_iterator
random_iterator
reverse_iterator

Download C++ Containers PDF Read All 19 C++ Containers Questions
Previous QuestionNext Question
What is random_access_iterator?What are storage classes?