Whats the requirement of Input Itrator?

Whats the requirement of Input Itrator?

An input iterator is an iterator that must satisfy the following set of requirements which is there :
> Default Constructible: The iterator must have a default constructor so that it can
be created without initializing it to any particular value. When an input iterator is
created using its default destructor, It is an invalid iterator. It remains invalid until it
is assigned a value.
> Assignable: The iterator must have a copy constructor and an overloaded assignment operator. These features allow for copying and assigning values to iterators.
> Equality Comparable: The iterator must have an overloaded equality operator == and an inequality operator !=. These operators allow for the comparison of two iterators.

By:UMANG
Date:2008-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related C Subjective Links

C Subjective interview questions and answers for experienced and fresher