1.

Which of the following is correct about Input Iterators?(a) They cannot be decremented(b) Cannot be used in multi-pass algorithms(c) Can only be incremented(d) All of the mentionedI had been asked this question during an interview.This intriguing question originated from Iterators in portion Algorithms, Objects & Iterators in C++ of C++

Answer»

The CORRECT OPTION is (d) All of the mentioned

Best EXPLANATION: Input ITERATORS can only be incremented and as it cannot be decremented it can be used in single-pass algorithms only.



Discussion

No Comment Found

Related InterviewSolutions